diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-12-11 13:43:46 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-12-28 12:48:59 -0800 |
commit | c7bab4d5778a91a54b3be7ed07931f92ea9a4561 (patch) | |
tree | 9952475656549f9efd2e2e0c6955573bbd181ddf /lib/chef/provider | |
parent | b88ff7352f0872a3897363d68966160bdafb4190 (diff) | |
download | chef-c7bab4d5778a91a54b3be7ed07931f92ea9a4561.tar.gz |
comments and spellcheck
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/package.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/package/dnf/dnf_helper.py | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index e71bee2b0d..f96ce34fc0 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -434,6 +434,8 @@ class Chef case action when :upgrade if current_version.nil? + # with installed_version_satisfies_version_constraints there may be a package installed, but it fails the user's + # requested new_resource.version constraints logger.trace("#{new_resource} has no existing installed version. Installing install #{candidate_version}") target_version_array.push(candidate_version) elsif version_equals?(current_version, new_version) @@ -467,6 +469,8 @@ class Chef target_version_array.push(new_version) end elsif current_version.nil? + # with installed_version_satisfies_version_constraints there may be a package installed, but it fails the user's + # requested new_resource.version constraints logger.trace("#{new_resource} #{package_name} not installed, installing #{candidate_version}") target_version_array.push(candidate_version) else diff --git a/lib/chef/provider/package/dnf/dnf_helper.py b/lib/chef/provider/package/dnf/dnf_helper.py index 2860473666..1dc797a643 100644 --- a/lib/chef/provider/package/dnf/dnf_helper.py +++ b/lib/chef/provider/package/dnf/dnf_helper.py @@ -98,6 +98,9 @@ def query(command): q = q.available() if 'epoch' in command: + # We assume that any glob is "*" so just omit the filter since the dnf libraries have no + # epoch__glob filter. That means "?" wildcards in epochs will fail. The workaround is to + # not use the version filter here but to put the version with all the globs in the package name. if not dnf.util.is_glob_pattern(command['epoch']): q = q.filterm(epoch=int(command['epoch'])) if 'version' in command: |