Skip to content

Commit

Permalink
distro-sync: Print better info message when no match
Browse files Browse the repository at this point in the history
Print better error message when the package specified in the argument is installed but is not available in the currently enabled repositories.

Resolves: https://issues.redhat.com/browse/RHEL-7018
  • Loading branch information
jan-kolarik authored and j-mracek committed Oct 11, 2023
1 parent 43e9249 commit c19ce84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ def distro_sync(self, pkg_spec=None):
sltrs = subject._get_best_selectors(self, solution=solution,
obsoletes=self.conf.obsoletes, reports=True)
if not sltrs:
logger.info(_('No package %s installed.'), pkg_spec)
logger.info(_('No match for argument: %s'), pkg_spec)
return 0
for sltr in sltrs:
self._goal.distupgrade(select=sltr)
Expand Down

0 comments on commit c19ce84

Please sign in to comment.