forked from rpms/dnf-plugins-core
import dnf-plugins-core-4.0.21-2.el8
This commit is contained in:
parent
0bb2bbe60d
commit
b9402ae552
@ -0,0 +1,38 @@
|
||||
From a3b9e17628994b43080b8c03b9f665a0e6514cd6 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Blaha <mblaha@redhat.com>
|
||||
Date: Tue, 11 May 2021 08:29:31 +0200
|
||||
Subject: [PATCH] versionlock: Do not exclude locked obsoleters (RhBug:1957280)
|
||||
|
||||
The versionlock plugin excludes all obsoleters of locked packages. If
|
||||
both versions (obsoleted package and its obsoleter) are locked, this
|
||||
leads to the inability to install the obsoleter package. The patch
|
||||
protects all locked packages from being excluded as obsoleters.
|
||||
|
||||
= changelog =
|
||||
msg: versionlock: Locking obsoleted package does not make the obsoleter unavailable
|
||||
type: bugfix
|
||||
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1957280
|
||||
---
|
||||
plugins/versionlock.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/plugins/versionlock.py b/plugins/versionlock.py
|
||||
index d997130..c89a75d 100644
|
||||
--- a/plugins/versionlock.py
|
||||
+++ b/plugins/versionlock.py
|
||||
@@ -113,8 +113,10 @@ class VersionLock(dnf.Plugin):
|
||||
other_versions = all_versions.difference(locked_query)
|
||||
excludes_query = excludes_query.union(other_versions)
|
||||
# exclude also anything that obsoletes the locked versions of packages
|
||||
- excludes_query = excludes_query.union(
|
||||
- self.base.sack.query().filterm(obsoletes=locked_query))
|
||||
+ obsoletes_query = self.base.sack.query().filterm(obsoletes=locked_query)
|
||||
+ # leave out obsoleters that are also part of locked versions (otherwise the obsoleter package
|
||||
+ # would not be installable at all)
|
||||
+ excludes_query = excludes_query.union(obsoletes_query.difference(locked_query))
|
||||
|
||||
excludes_query.filterm(reponame__neq=hawkey.SYSTEM_REPO_NAME)
|
||||
if excludes_query:
|
||||
--
|
||||
libgit2 1.0.1
|
||||
|
@ -0,0 +1,49 @@
|
||||
From 716c5978a8036df22d6f5b430ba38c35d034f3ea Mon Sep 17 00:00:00 2001
|
||||
From: Aleš Matěj <amatej@redhat.com>
|
||||
Date: Tue, 8 Jun 2021 10:25:55 +0200
|
||||
Subject: [PATCH] [repomanage] Allow running only with metadata
|
||||
|
||||
Requiring some packages to be present even if there are repodata was
|
||||
arbitrary because they are never used.
|
||||
---
|
||||
plugins/repomanage.py | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/plugins/repomanage.py b/plugins/repomanage.py
|
||||
index 445006d..989bd78 100644
|
||||
--- a/plugins/repomanage.py
|
||||
+++ b/plugins/repomanage.py
|
||||
@@ -58,18 +58,13 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
if self.opts.new and self.opts.old:
|
||||
raise dnf.exceptions.Error(_("Pass either --old or --new, not both!"))
|
||||
|
||||
- rpm_list = []
|
||||
- rpm_list = self._get_file_list(self.opts.path, ".rpm")
|
||||
verfile = {}
|
||||
pkgdict = {}
|
||||
module_dict = {} # {NameStream: {Version: [modules]}}
|
||||
all_modular_artifacts = set()
|
||||
|
||||
keepnum = int(self.opts.keep) # the number of items to keep
|
||||
|
||||
- if len(rpm_list) == 0:
|
||||
- raise dnf.exceptions.Error(_("No files to process"))
|
||||
-
|
||||
try:
|
||||
repo_conf = self.base.repos.add_new_repo("repomanage_repo", self.base.conf, baseurl=[self.opts.path])
|
||||
# Always expire the repo, otherwise repomanage could use cached metadata and give identical results
|
||||
@@ -88,6 +83,11 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
module_package.getVersionNum(), []).append(module_package)
|
||||
|
||||
except dnf.exceptions.RepoError:
|
||||
+ rpm_list = []
|
||||
+ rpm_list = self._get_file_list(self.opts.path, ".rpm")
|
||||
+ if len(rpm_list) == 0:
|
||||
+ raise dnf.exceptions.Error(_("No files to process"))
|
||||
+
|
||||
self.base.reset(sack=True, repos=True)
|
||||
self.base.fill_sack(load_system_repo=False, load_available_repos=False)
|
||||
try:
|
||||
--
|
||||
libgit2 1.0.1
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 1b432bada5a3627f729cb42b99b7a93f808e3a80 Mon Sep 17 00:00:00 2001
|
||||
From: Aleš Matěj <amatej@redhat.com>
|
||||
Date: Tue, 8 Jun 2021 11:48:07 +0200
|
||||
Subject: [PATCH] [repomanage] Enhance repomanage documentation (RhBug:1898293)
|
||||
|
||||
= changelog =
|
||||
msg: Enhance repomanage documentation
|
||||
type: enhancement
|
||||
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1898293
|
||||
---
|
||||
doc/repomanage.rst | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/doc/repomanage.rst b/doc/repomanage.rst
|
||||
index e4da441..e3171ef 100644
|
||||
--- a/doc/repomanage.rst
|
||||
+++ b/doc/repomanage.rst
|
||||
@@ -31,9 +31,10 @@ Synopsis
|
||||
Description
|
||||
-----------
|
||||
|
||||
-`repomanage` prints newest or oldest packages in a repository specified by <path> for easy piping to xargs or similar programs. In case <path> doesn't contain a valid repository it is searched for rpm packages which are then used instead.
|
||||
+`repomanage` prints newest or older packages in a repository specified by <path> for easy piping to xargs or similar programs. In case <path> doesn't contain a valid repodata, it is searched for rpm packages which are then used instead.
|
||||
+If the repodata are present, `repomanage` uses them as the source of truth, it doesn't verify that they match the present rpm packages. In fact, `repomanage` can run with just the repodata, no rpm packages are needed.
|
||||
|
||||
-In order to work correctly with modular packages <path> has to contain repodata with modular metadata. If modular content is present `repomanage` prints packages from newest or oldest versions of each stream in addition to newest or oldest non-modular packages.
|
||||
+In order to work correctly with modular packages, <path> has to contain repodata with modular metadata. If modular content is present, `repomanage` prints packages from newest or older stream versions in addition to newest or older non-modular packages.
|
||||
|
||||
|
||||
Options
|
||||
@@ -44,7 +45,7 @@ All general DNF options are accepted, see `Options` in :manpage:`dnf(8)` for det
|
||||
The following options set what packages are displayed. These options are mutually exclusive, i.e. only one can be specified. If no option is specified, the newest packages are shown.
|
||||
|
||||
``--old``
|
||||
- Show older packages.
|
||||
+ Show older packages (for a package or a stream show all versions except the newest one).
|
||||
|
||||
``--new``
|
||||
Show newest packages.
|
||||
--
|
||||
libgit2 1.0.1
|
||||
|
@ -34,11 +34,14 @@
|
||||
|
||||
Name: dnf-plugins-core
|
||||
Version: 4.0.21
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Core Plugins for DNF
|
||||
License: GPLv2+
|
||||
URL: https://github.com/rpm-software-management/dnf-plugins-core
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch1: 0001-versionlock-Do-not-exclude-locked-obsoleters-RhBug1957280.patch
|
||||
Patch2: 0002-repomanage-Allow-running-only-with-metadata.patch
|
||||
Patch3: 0003-repomanage-Enhance-repomanage-documentation-RhBug1898293.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: cmake
|
||||
@ -762,6 +765,11 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jul 27 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-2
|
||||
- [versionlock] Locking obsoleted package does not make the obsoleter unavailable (RhBug:1957280)
|
||||
- [repomanage] Allow running with metadata only
|
||||
- [repomanage] Enhance repomanage documentation (RhBug:1898293)
|
||||
|
||||
* Wed May 19 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-1
|
||||
- Update to 4.0.21
|
||||
- [repomanage] Don't use cached metadata (RhBug:1899852)
|
||||
|
Loading…
Reference in New Issue
Block a user