Skip to content

Commit

Permalink
remove --oldinstallonly: when no old installonly packages, exit with 0
Browse files Browse the repository at this point in the history
Upstream commit: 87eb5a7

If no old installonly packages are present, then the command succesfully
removed all of them and should exit with 0 and write the message to
stdout instead of stderr.

Resolves: https://issues.redhat.com/browse/RHEL-6424
  • Loading branch information
pkratoch authored and ppisar committed May 21, 2024
1 parent 32a47c3 commit be6730f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dnf/cli/commands/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ def run(self):
for pkg in instonly:
self.base.package_remove(pkg)
else:
raise dnf.exceptions.Error(
_('No old installonly packages found for removal.'))
logger.info(_('No old installonly packages found for removal.'))
return

# Remove groups.
Expand Down

0 comments on commit be6730f

Please sign in to comment.