diff --git a/backport-distro-sync-Print-better-info-message-when-no-match.patch b/backport-distro-sync-Print-better-info-message-when-no-match.patch new file mode 100644 index 0000000000000000000000000000000000000000..ed7720fc9129cd35ddb9b98c9a490cfc9b2d9e70 --- /dev/null +++ b/backport-distro-sync-Print-better-info-message-when-no-match.patch @@ -0,0 +1,25 @@ +From 04717992a69ef463cc73627d95577ffb64af09a3 Mon Sep 17 00:00:00 2001 +From: Jan Kolarik +Date: Fri, 22 Sep 2023 12:55:39 +0000 +Subject: [PATCH] distro-sync: Print better info message when no match + +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 +--- + dnf/base.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dnf/base.py b/dnf/base.py +index ff7c6fe77e..b43cf00766 100644 +--- a/dnf/base.py ++++ b/dnf/base.py +@@ -2250,7 +2250,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) diff --git a/dnf.spec b/dnf.spec index 2e747cc79d574df3453495df581a5461d32f40ea..5aa2d845fb3661b7f4ba97a0bc46bd1818433a82 100644 --- a/dnf.spec +++ b/dnf.spec @@ -3,7 +3,7 @@ Name: dnf Version: 4.14.0 -Release: 23 +Release: 24 Summary: A software package manager that manages packages on Linux distributions. License: GPL-2.0-or-later AND GPL-1.0-only URL: https://github.com/rpm-software-management/dnf @@ -34,6 +34,7 @@ Patch6014: backport-Limit-queries-to-nevra-forms-when-provided-by-com Patch6015: backport-doc-Remove-provide-of-spec-definition-for-repoquery-command.patch Patch6016: backport-Update-the-man-page-entry-for-the-countme-option.patch Patch6017: backport-Allow-local-downloads-to-same-downloaddir.patch +Patch6018: backport-distro-sync-Print-better-info-message-when-no-match.patch BuildArch: noarch BuildRequires: cmake gettext systemd bash-completion python3-sphinx @@ -258,6 +259,12 @@ popd %{_mandir}/man8/%{name}-automatic.8* %changelog +* Thu Jul 17 2025 majianhan - 4.14.0-24 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:distro-sync: Print better info message when no match + * Sat Oct 19 2024 hanhuihui - 4.14.0-23 - Type:bugfix - CVE:NA