You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
On FreeBSD, packages can be installed by either their "package name" or their "origin name". For example, if I want to install the zstd library for PHP, I can use either of the following commands:
Package name: pkg install php84-zstd
Origin name: pkg install archivers/php-zstd
Salt added support for this in v2015.5.4 (6b0f4fc) but the change did not enable Salt to detect the installed package when run in test mode (state.test).
Setup
on-prem machine
VM (Virtualbox, KVM, etc. please specify)
VM running on AWS EC2
container (Kubernetes, Docker, containerd, etc. please specify)
or a combination, please be explicit
jails if it is FreeBSD
classic packaging
onedir packaging
used bootstrap to install
Steps to Reproduce the behavior
Create a state that installs a FreeBSD package using the origin name, such as:
java:
pkg.installed:
- name: java/openjdk17
Apply the state with salt-call state.apply as usual.
# salt-call state.apply openjdk
local:
----------
ID: java
Function: pkg.installed
Name: java/openjdk17
Result: True
Comment: The following packages were installed/updated: java/openjdk17
Started: 16:47:42.969697
Duration: 17525.373 ms
Changes:
----------
openjdk17:
----------
new:
17.0.12+7.1
old:
Summary for local
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
Total states run: 1
Total run time: 17.525 s
Run the state again in test mode using salt-call state.test, and it will fail to detect the installed package.
# salt-call state.test openjdk
local:
----------
ID: java
Function: pkg.installed
Name: java/openjdk17
Result: None
Comment: The following packages would be installed/updated: java/openjdk17
Started: 16:49:46.899851
Duration: 1250.466 ms
Changes:
----------
java/openjdk17:
----------
new:
installed
old:
Summary for local
------------
Succeeded: 1 (unchanged=1, changed=1)
Failed: 0
------------
Total states run: 1
Total run time: 1.250 s
Expected behavior
State runs in test mode should detect the installed package and report no changes.
# sudo salt-call state.test openjdk
local:
----------
ID: java
Function: pkg.installed
Name: java/openjdk17
Result: True
Comment: All specified packages are already installed
Started: 16:53:12.661629
Duration: 82.012 ms
Changes:
Summary for local
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
Total run time: 82.012 ms
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 3006.8Python Version:
Python: 3.11.10 (main, Oct 31 2024, 01:10:40) [Clang 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15Dependency Versions:
cffi: 1.17.1cherrypy: Not Installeddateutil: 2.9.0docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.4libgit2: 1.7.2looseversion: 1.3.0M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.1.0msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 24.1pycparser: 2.22pycrypto: Not Installedpycryptodome: 3.20.0pygit2: 1.14.1python-gnupg: Not InstalledPyYAML: 6.0.1PyZMQ: 25.0.2relenv: Not Installedsmmap: Not Installedtimelib: Not InstalledTornado: 4.5.3ZMQ: 4.3.5System Versions:
dist: freebsd 14.2locale: utf-8machine: amd64release: 14.2-RELEASEsystem: FreeBSDversion: FreeBSD 14.2
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Description
On FreeBSD, packages can be installed by either their "package name" or their "origin name". For example, if I want to install the
zstd
library for PHP, I can use either of the following commands:pkg install php84-zstd
pkg install archivers/php-zstd
Salt added support for this in v2015.5.4 (6b0f4fc) but the change did not enable Salt to detect the installed package when run in test mode (
state.test
).Setup
Steps to Reproduce the behavior
Create a state that installs a FreeBSD package using the origin name, such as:
Apply the state with
salt-call state.apply
as usual.Run the state again in test mode using
salt-call state.test
, and it will fail to detect the installed package.Expected behavior
State runs in test mode should detect the installed package and report no changes.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: