Skip to content

Commit

Permalink
Fixes #35759 - specify package evr when updating via errata to match …
Browse files Browse the repository at this point in the history
…upgrade-minimal (#140)
  • Loading branch information
ianballou committed Nov 17, 2022
1 parent f765e16 commit 046a17d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/katello/agent/pulp/libdnf.py
Expand Up @@ -256,7 +256,7 @@ def update(self, patterns=(), advisories=()):
if advisories:
for ad, packages in lib.applicable_advisories(AdvisoryFilter(ids=advisories)):
for name, evr in packages:
patterns.add(name)
patterns.add(name + '-' + evr)
if patterns:
lib.upgrade(patterns)
else:
Expand Down
5 changes: 3 additions & 2 deletions test/test_katello/test_agent/test_pulp/test_libdnf.py
Expand Up @@ -23,8 +23,9 @@ def applicable_advisories(items):
package = libdnf.Package()
package.update([],advisories)

#strip the evrs out of the package
packages = set([pack[0] for pack in packages])
# ensure the packages have evrs included
# https://projects.theforeman.org/issues/35759
packages = set([pack[0] + '-' + pack[1] for pack in packages])
mock_libdnf.upgrade.assert_called_with(packages)

def test_package_update_all(self):
Expand Down

0 comments on commit 046a17d

Please sign in to comment.