Auto sync2gitlab import of dnf-plugins-core-4.0.21-12.el8.src.rpm
This commit is contained in:
parent
28e5761fa2
commit
bf7130fdd0
@ -1,7 +1,7 @@
|
||||
From ef261df4ed656b9e49bf3029643dfdfae82ea416 Mon Sep 17 00:00:00 2001
|
||||
From 7844c40c75b3b753284982398962d399f63ef6f0 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Blaha <mblaha@redhat.com>
|
||||
Date: Fri, 18 Mar 2022 15:29:49 +0100
|
||||
Subject: [PATCH] Update translations (RhBug:2017348)
|
||||
Subject: [PATCH] Update translations (RhBug:2017271)
|
||||
|
||||
---
|
||||
po/dnf-plugins-core.pot | 434 +++++++++++++++------
|
||||
@ -7020,5 +7020,5 @@ index 755d9e6..f7ea95b 100644
|
||||
#~ "\n"
|
||||
#~ "These repositories have been enabled automatically.\n"
|
||||
--
|
||||
2.35.1
|
||||
2.36.1
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
From e80f79b2f5e17a20065617c0b614b272dd53c57c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
|
||||
Date: Thu, 26 May 2022 07:21:45 +0200
|
||||
Subject: [PATCH] repomanage: Use modules only from repo they are handling
|
||||
(RhBug:2072441)
|
||||
|
||||
= changelog =
|
||||
msg: [repomanage] Modules are used only when they belong to target repo
|
||||
type: bugfix
|
||||
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2072441
|
||||
---
|
||||
plugins/repomanage.py | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/plugins/repomanage.py b/plugins/repomanage.py
|
||||
index 989bd78..67a6fc7 100644
|
||||
--- a/plugins/repomanage.py
|
||||
+++ b/plugins/repomanage.py
|
||||
@@ -66,7 +66,8 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
keepnum = int(self.opts.keep) # the number of items to keep
|
||||
|
||||
try:
|
||||
- repo_conf = self.base.repos.add_new_repo("repomanage_repo", self.base.conf, baseurl=[self.opts.path])
|
||||
+ REPOMANAGE_REPOID = "repomanage_repo"
|
||||
+ repo_conf = self.base.repos.add_new_repo(REPOMANAGE_REPOID, self.base.conf, baseurl=[self.opts.path])
|
||||
# Always expire the repo, otherwise repomanage could use cached metadata and give identical results
|
||||
# for multiple runs even if the actual repo changed in the meantime
|
||||
repo_conf._repo.expire()
|
||||
@@ -78,9 +79,13 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
module_packages = self.base._moduleContainer.getModulePackages()
|
||||
|
||||
for module_package in module_packages:
|
||||
- all_modular_artifacts.update(module_package.getArtifacts())
|
||||
- module_dict.setdefault(module_package.getNameStream(), {}).setdefault(
|
||||
- module_package.getVersionNum(), []).append(module_package)
|
||||
+ # Even though we load only REPOMANAGE_REPOID other modules can be loaded from system
|
||||
+ # failsafe data automatically, we don't want them affecting repomanage results so ONLY
|
||||
+ # use modules from REPOMANAGE_REPOID.
|
||||
+ if module_package.getRepoID() == REPOMANAGE_REPOID:
|
||||
+ all_modular_artifacts.update(module_package.getArtifacts())
|
||||
+ module_dict.setdefault(module_package.getNameStream(), {}).setdefault(
|
||||
+ module_package.getVersionNum(), []).append(module_package)
|
||||
|
||||
except dnf.exceptions.RepoError:
|
||||
rpm_list = []
|
||||
--
|
||||
2.36.1
|
||||
|
117
0014-feat-repomanage-Add-new-option-oldonly.patch
Normal file
117
0014-feat-repomanage-Add-new-option-oldonly.patch
Normal file
@ -0,0 +1,117 @@
|
||||
From eb1d6edf55c167d575ce3d16bd6349e382d05600 Mon Sep 17 00:00:00 2001
|
||||
From: Masahiro Matsuya <mmatsuya@redhat.com>
|
||||
Date: Wed, 13 Apr 2022 18:42:03 +0900
|
||||
Subject: [PATCH] feat(repomanage): Add new option --oldonly
|
||||
|
||||
= changelog =
|
||||
msg: repomanage: Add new option --oldonly
|
||||
type: enhancement
|
||||
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2034736
|
||||
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2058676
|
||||
---
|
||||
doc/repomanage.rst | 3 +++
|
||||
plugins/repomanage.py | 46 ++++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 46 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/doc/repomanage.rst b/doc/repomanage.rst
|
||||
index e3171ef..3c01289 100644
|
||||
--- a/doc/repomanage.rst
|
||||
+++ b/doc/repomanage.rst
|
||||
@@ -47,6 +47,9 @@ The following options set what packages are displayed. These options are mutuall
|
||||
``--old``
|
||||
Show older packages (for a package or a stream show all versions except the newest one).
|
||||
|
||||
+``--oldonly``
|
||||
+ Show older packages (same as --old, but exclude the newest packages even when it's included in the older stream versions).
|
||||
+
|
||||
``--new``
|
||||
Show newest packages.
|
||||
|
||||
diff --git a/plugins/repomanage.py b/plugins/repomanage.py
|
||||
index 67a6fc7..d23497a 100644
|
||||
--- a/plugins/repomanage.py
|
||||
+++ b/plugins/repomanage.py
|
||||
@@ -57,6 +57,12 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
def run(self):
|
||||
if self.opts.new and self.opts.old:
|
||||
raise dnf.exceptions.Error(_("Pass either --old or --new, not both!"))
|
||||
+ if self.opts.new and self.opts.oldonly:
|
||||
+ raise dnf.exceptions.Error(_("Pass either --oldonly or --new, not both!"))
|
||||
+ if self.opts.old and self.opts.oldonly:
|
||||
+ raise dnf.exceptions.Error(_("Pass either --old or --oldonly, not both!"))
|
||||
+ if not self.opts.old and not self.opts.oldonly:
|
||||
+ self.opts.new = True
|
||||
|
||||
verfile = {}
|
||||
pkgdict = {}
|
||||
@@ -123,8 +129,7 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
# modular packages
|
||||
keepnum_latest_stream_artifacts = set()
|
||||
|
||||
- # if new
|
||||
- if not self.opts.old:
|
||||
+ if self.opts.new:
|
||||
# regular packages
|
||||
for (n, a) in pkgdict.keys():
|
||||
evrlist = pkgdict[(n, a)]
|
||||
@@ -146,7 +151,6 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
for stream in streams_by_version[i]:
|
||||
keepnum_latest_stream_artifacts.update(set(stream.getArtifacts()))
|
||||
|
||||
-
|
||||
if self.opts.old:
|
||||
# regular packages
|
||||
for (n, a) in pkgdict.keys():
|
||||
@@ -169,6 +173,40 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
for stream in streams_by_version[i]:
|
||||
keepnum_latest_stream_artifacts.update(set(stream.getArtifacts()))
|
||||
|
||||
+ if self.opts.oldonly:
|
||||
+ # regular packages
|
||||
+ for (n, a) in pkgdict.keys():
|
||||
+ evrlist = pkgdict[(n, a)]
|
||||
+
|
||||
+ oldevrs = evrlist[:-keepnum]
|
||||
+
|
||||
+ for package in oldevrs:
|
||||
+ nevra = self._package_to_nevra(package)
|
||||
+ for fpkg in verfile[nevra]:
|
||||
+ outputpackages.append(fpkg)
|
||||
+
|
||||
+ # modular packages
|
||||
+ keepnum_newer_stream_artifacts = set()
|
||||
+
|
||||
+ for streams_by_version in module_dict.values():
|
||||
+ sorted_stream_versions = sorted(streams_by_version.keys())
|
||||
+
|
||||
+ new_sorted_stream_versions = sorted_stream_versions[-keepnum:]
|
||||
+
|
||||
+ for i in new_sorted_stream_versions:
|
||||
+ for stream in streams_by_version[i]:
|
||||
+ keepnum_newer_stream_artifacts.update(set(stream.getArtifacts()))
|
||||
+
|
||||
+ for streams_by_version in module_dict.values():
|
||||
+ sorted_stream_versions = sorted(streams_by_version.keys())
|
||||
+
|
||||
+ old_sorted_stream_versions = sorted_stream_versions[:-keepnum]
|
||||
+
|
||||
+ for i in old_sorted_stream_versions:
|
||||
+ for stream in streams_by_version[i]:
|
||||
+ for artifact in stream.getArtifacts():
|
||||
+ if artifact not in keepnum_newer_stream_artifacts:
|
||||
+ keepnum_latest_stream_artifacts.add(artifact)
|
||||
|
||||
modular_packages = [self._package_to_path(x) for x in query.filter(pkg__eq=query.filter(nevra_strict=keepnum_latest_stream_artifacts)).available()]
|
||||
outputpackages = outputpackages + modular_packages
|
||||
@@ -183,6 +221,8 @@ class RepoManageCommand(dnf.cli.Command):
|
||||
def set_argparser(parser):
|
||||
parser.add_argument("-o", "--old", action="store_true",
|
||||
help=_("Print the older packages"))
|
||||
+ parser.add_argument("-O", "--oldonly", action="store_true",
|
||||
+ help=_("Print the older packages. Exclude the newest packages."))
|
||||
parser.add_argument("-n", "--new", action="store_true",
|
||||
help=_("Print the newest packages"))
|
||||
parser.add_argument("-s", "--space", action="store_true",
|
||||
--
|
||||
2.36.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From b4e0cafe70680db24ab3611e0fd4dd95c8311ccc Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Tue, 26 Apr 2022 11:23:41 +0200
|
||||
Subject: [PATCH] Skip all non rpm tsi for transaction_action plugins
|
||||
(rhbug:2023652)
|
||||
|
||||
It prevent traceback in output when reason change is in transaction
|
||||
---
|
||||
plugins/post-transaction-actions.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/plugins/post-transaction-actions.py b/plugins/post-transaction-actions.py
|
||||
index 05a7841..1520c26 100644
|
||||
--- a/plugins/post-transaction-actions.py
|
||||
+++ b/plugins/post-transaction-actions.py
|
||||
@@ -115,6 +115,9 @@ class PostTransactionActions(dnf.Plugin):
|
||||
in_ts_items.append(ts_item)
|
||||
elif ts_item.action in dnf.transaction.BACKWARD_ACTIONS:
|
||||
out_ts_items.append(ts_item)
|
||||
+ else:
|
||||
+ # The action is not rpm change. It can be a reason change, therefore we can skip that item
|
||||
+ continue
|
||||
all_ts_items.append(ts_item)
|
||||
|
||||
commands_to_run = []
|
||||
--
|
||||
2.36.1
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
Name: dnf-plugins-core
|
||||
Version: 4.0.21
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Summary: Core Plugins for DNF
|
||||
License: GPLv2+
|
||||
URL: https://github.com/rpm-software-management/dnf-plugins-core
|
||||
@ -51,6 +51,10 @@ Patch9: 0009-Update-documentation-for-adding-specific-version-RhBug20133
|
||||
Patch10: 0010-needs-restarting-Fix-wrong-boot-time-RhBug1960437.patch
|
||||
Patch11: 0011-Add-new-command-modulesync-RhBug1868047.patch
|
||||
Patch12: 0012-Update-translations-RhBug-2017271.patch
|
||||
Patch13: 0013-repomanage-Use-modules-only-from-repo-they-are-handl.patch
|
||||
Patch14: 0014-feat-repomanage-Add-new-option-oldonly.patch
|
||||
Patch15: 0015-Skip-all-non-rpm-tsi-for-transaction_action-plugins-.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: cmake
|
||||
@ -794,7 +798,10 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Mar 18 2022 Marek Blaha <mblaha@redhat.com> - 4.0.21-11
|
||||
* Tue Jun 14 2022 Lukas Hrazky <lhrazky@redhat.com> - 4.0.21-12
|
||||
- [repomanage] Use modules only from repo they are handling
|
||||
- [repomanage] Add new option --oldonly
|
||||
- Skip all non rpm tsi for transaction_action plugins
|
||||
- Update translations
|
||||
|
||||
* Fri Jan 14 2022 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-10
|
||||
|
Loading…
Reference in New Issue
Block a user