Windows file management re-uses a lot of functions from
salt.modules.file, and a new function added in b93c724, which is needed
in check_file_meta(), was not added to the functions that are imported
into win_file.py. Fixes#6116.
The current behavior of this function will remove all instances of '1'
from the version list for a package. If the list only contains multiple
instances of '1', this will clear the list though, and that's not what
is wanted. The intention I had for this function when I wrote it was to
strip all virtual package markers if that package is both a real package
and virtual package, but also to take instances where more than one
target of a virtual package is installed, and make it so that only one
instance of '1' is in the version list for that package. This commit
adjusts the behavior to work that way.
This function is old code that is unneeded due to changes in how salt
manages packages. It also represents a bug in which trying to use a
pkg.removed state using the pkgname:i386 format used by apt for 32-bit
packages on 64-bit systems always fails, because the package is
identified as pkgname, not pkgname:i386. Additionally, using just
"pkgname" in your pkg.removed state would fail, because running "apt-get
remove pkgname" would fail for pkgname:i386.
This commit refreshes modules when there are changes in a file.symlink
state with 'bin' in the name. Making this distinction keeps refreshes
from being done for all symlinks, reducing the amount of overhead this
change would introduce. A symlink with 'bin' in the name is likely to
change the available commands on the minion, and thus might make
available certain states/modules which rely on the existence of a given
command in the user's PATH. Without a refresh, these states/module
function calls would fail despite the needed shell command technically
being available.
Salt dynamically reloads modules durring highstate calls to ensure that
the highstate does not need to be run twice. If this behavior is not
being seen then this is a bug of the highstate run is not tracking the
software insalation of powerpath correctly and needs to be extended
Now that rh_service.py has been refactored in such a way that chkconfig
is needed less, module context is not used. Therefore, the logic that
clears out this variable is now unnecessary.
Since the function doesn't really return an empty password, but rather
the default hash, this change makes the naming more accurate, especially
since this function is exposed to the user.