diff --git a/.gitignore b/.gitignore index 07f05c0..5a281ae 100644 --- a/.gitignore +++ b/.gitignore @@ -122,3 +122,4 @@ /dnf-3.5.1.tar.gz /dnf-3.6.1.tar.gz /dnf-4.0.4.tar.gz +/dnf-4.0.9.tar.gz diff --git a/0001-Set-tsi-state-if-multiple-pkgs-have-same-nevra-RhBug1642796.patch b/0001-Set-tsi-state-if-multiple-pkgs-have-same-nevra-RhBug1642796.patch deleted file mode 100644 index 76b0352..0000000 --- a/0001-Set-tsi-state-if-multiple-pkgs-have-same-nevra-RhBug1642796.patch +++ /dev/null @@ -1,177 +0,0 @@ -From d2fd9ee7e3cf31d7c90c7f8202de5c360c3511a4 Mon Sep 17 00:00:00 2001 -From: Jaroslav Mracek -Date: Tue, 6 Nov 2018 15:38:00 +0100 -Subject: [PATCH] Set tsi state if multiple pkgs have same nevra (RhBug:1642796) - ---- - dnf/yum/rpmtrans.py | 80 ++++++++++++++++++++++++++++++++++++++++---------------------------------------- - 1 file changed, 40 insertions(+), 40 deletions(-) - -diff --git a/dnf/yum/rpmtrans.py b/dnf/yum/rpmtrans.py -index 9a80ab6..f8b76a7 100644 ---- a/dnf/yum/rpmtrans.py -+++ b/dnf/yum/rpmtrans.py -@@ -217,22 +217,23 @@ class RPMTransaction(object): - - if hasattr(cbkey, "pkg"): - tsi = cbkey -- return tsi.pkg, tsi.action, tsi -+ return [tsi] - - te = self._te_list[self._te_index] - te_nevra = dnf.util._te_nevra(te) -- if self._tsi_cache is not None: -- if str(self._tsi_cache) == te_nevra: -- return self._tsi_cache.pkg, self._tsi_cache.action, self._tsi_cache -- -+ if self._tsi_cache: -+ if str(self._tsi_cache[0]) == te_nevra: -+ return self._tsi_cache -+ items = [] - for tsi in self.base.transaction: - if tsi.action == libdnf.transaction.TransactionItemAction_REINSTALL: - # skip REINSTALL in order to return REINSTALLED - continue - if str(tsi) == te_nevra: -- self._tsi_cache = tsi -- return tsi.pkg, tsi.action, tsi -- -+ items.append(tsi) -+ if items: -+ self._tsi_cache = items -+ return items - raise RuntimeError("TransactionItem not found for key: %s" % cbkey) - - def callback(self, what, amount, total, key, client_data): -@@ -292,13 +293,14 @@ class RPMTransaction(object): - self._te_index = index - self.complete_actions += 1 - if not self.test: -- _, _, tsi = self._extract_cbkey(key) -+ transaction_list = self._extract_cbkey(key) - for display in self.displays: -- display.filelog(tsi.pkg, tsi.action) -+ display.filelog(transaction_list[0].pkg, transaction_list[0].action) - - def _instOpenFile(self, key): - self.lastmsg = None -- pkg, _, _ = self._extract_cbkey(key) -+ transaction_list = self._extract_cbkey(key) -+ pkg = transaction_list[0].pkg - rpmloc = pkg.localPkg() - try: - self.fd = open(rpmloc) -@@ -312,15 +314,16 @@ class RPMTransaction(object): - return self.fd.fileno() - - def _instCloseFile(self, key): -- _, _, tsi = self._extract_cbkey(key) -+ transaction_list = self._extract_cbkey(key) - self.fd.close() - self.fd = None - - if self.test or not self.trans_running: - return -- -- if tsi.state == libdnf.transaction.TransactionItemState_UNKNOWN: -- tsi.state = libdnf.transaction.TransactionItemState_DONE -+ for tsi in transaction_list: -+ if tsi.state == libdnf.transaction.TransactionItemState_UNKNOWN: -+ tsi.state = libdnf.transaction.TransactionItemState_DONE -+ break - - for display in self.displays: - display.filelog(tsi.pkg, tsi.action) -@@ -333,27 +336,28 @@ class RPMTransaction(object): - display.progress(None, action, None, None, None, None) - - def _instProgress(self, amount, total, key): -- _, _, tsi = self._extract_cbkey(key) -+ transaction_list = self._extract_cbkey(key) -+ pkg = transaction_list[0].pkg -+ action = transaction_list[0].action - for display in self.displays: -- display.progress( -- tsi.pkg, tsi.action, amount, total, self.complete_actions, -- self.total_actions) -+ display.progress(pkg, action, amount, total, self.complete_actions, self.total_actions) - - def _uninst_start(self, key): - self.total_removed += 1 - - def _uninst_progress(self, amount, total, key): -- _, _, tsi = self._extract_cbkey(key) -+ transaction_list = self._extract_cbkey(key) -+ pkg = transaction_list[0].pkg -+ action = transaction_list[0].action - for display in self.displays: -- display.progress( -- tsi.pkg, tsi.action, amount, total, self.complete_actions, -- self.total_actions) -+ display.progress(pkg, action, amount, total, self.complete_actions, self.total_actions) - - def _unInstStop(self, key): -- _, _, tsi = self._extract_cbkey(key) -- -- if tsi.state == libdnf.transaction.TransactionItemState_UNKNOWN: -- tsi.state = libdnf.transaction.TransactionItemState_DONE -+ transaction_list = self._extract_cbkey(key) -+ for tsi in transaction_list: -+ if tsi.state == libdnf.transaction.TransactionItemState_UNKNOWN: -+ tsi.state = libdnf.transaction.TransactionItemState_DONE -+ break - - for display in self.displays: - display.filelog(tsi.pkg, tsi.action) -@@ -364,31 +368,26 @@ class RPMTransaction(object): - self._scriptout() - - def _cpioError(self, key): -- # In the case of a remove, we only have a name, not a tsi: -- pkg, _, _ = self._extract_cbkey(key) -- msg = "Error in cpio payload of rpm package %s" % pkg -+ transaction_list = self._extract_cbkey(key) -+ msg = "Error in cpio payload of rpm package %s" % transaction_list[0].pkg - for display in self.displays: - display.error(msg) - - def _unpackError(self, key): -- pkg, _, tsi = self._extract_cbkey(key) -- msg = "Error unpacking rpm package %s" % pkg -+ transaction_list = self._extract_cbkey(key) -+ tsi = transaction_list[0] -+ msg = "Error unpacking rpm package %s" % tsi.pkg - for display in self.displays: - display.error(msg) - tsi.state = libdnf.transaction.TransactionItemState_ERROR - - def _scriptError(self, amount, total, key): - # "amount" carries the failed scriptlet tag, - # "total" carries fatal/non-fatal status - scriptlet_name = rpm.tagnames.get(amount, "") - -- pkg, _, _ = self._extract_cbkey(key) -- if pkg is not None: -- name = pkg.name -- elif dnf.util.is_string_type(key): -- name = key -- else: -- name = 'None' -+ transaction_list = self._extract_cbkey(key) -+ name = transaction_list[0].pkg.name - - msg = ("Error in %s scriptlet in rpm package %s" % (scriptlet_name, name)) - -@@ -401,7 +400,8 @@ class RPMTransaction(object): - if key is None and self._te_list == []: - pkg = 'None' - else: -- pkg, _, _ = self._extract_cbkey(key) -+ transaction_list = self._extract_cbkey(key) -+ pkg = transaction_list[0].pkg - complete = self.complete_actions if self.total_actions != 0 and self.complete_actions != 0 \ - else 1 - total = self.total_actions if self.total_actions != 0 and self.complete_actions != 0 else 1 --- -libgit2 0.26.7 - diff --git a/dnf.spec b/dnf.spec index da886d8..fed7d91 100644 --- a/dnf.spec +++ b/dnf.spec @@ -1,11 +1,11 @@ # default dependencies -%global hawkey_version 0.22.0 +%global hawkey_version 0.22.3 %global libcomps_version 0.1.8 %global libmodulemd_version 1.4.0 %global rpm_version 4.14.0 # conflicts -%global conflicts_dnf_plugins_core_version 3.1 +%global conflicts_dnf_plugins_core_version 4.0.2 %global conflicts_dnf_plugins_extras_version 3.0.2 %global conflicts_dnfdaemon_version 0.3.19 @@ -30,7 +30,7 @@ %bcond_without python3 %endif -%if 0%{?rhel} >= 8 +%if 0%{?rhel} >= 8 || 0%{?fedora} > 29 # Disable python2 build %bcond_with python2 %else @@ -72,14 +72,13 @@ It supports RPMs, modules and comps groups & environments. Name: dnf -Version: 4.0.4 -Release: 2%{?dist} +Version: 4.0.9 +Release: 1%{?dist} Summary: %{pkg_summary} # For a breakdown of the licensing, see PACKAGE-LICENSING License: GPLv2+ and GPLv2 and GPL URL: https://github.com/rpm-software-management/dnf Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0001: 0001-Set-tsi-state-if-multiple-pkgs-have-same-nevra-RhBug1642796.patch BuildArch: noarch BuildRequires: cmake BuildRequires: gettext @@ -495,6 +494,19 @@ ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars %endif %changelog +* Thu Nov 22 2018 Jaroslav Mracek - 4.0.9-1 +- Added dnf.repo.Repo.get_http_headers +- Added dnf.repo.Repo.set_http_headers +- Added dnf.repo.Repo.add_metadata_type_to_download +- Added dnf.repo.Repo.get_metadata_path +- Added dnf.repo.Repo.get_metadata_content +- Added --changelogs option for check-update command +- [module] Add information about active modules +- Hide messages created only for logging +- Enhanced --setopt option +- [module] Fix dnf remove @ +- [transaction] Make transaction content available for plugins + * Wed Nov 07 2018 Jaroslav Mracek - 4.0.4-2 - Backport fixes for RHBZ#1642796 from upstream master diff --git a/sources b/sources index e5ed5ab..576a87c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dnf-4.0.4.tar.gz) = b58c8f8b109d621fc58a24f85b387829686773bed1dc4761c75ee4649387ec599e2b650b119ad29a587a91f66b9c9d416bb7001f058f3c86260f8329a7ea8f99 +SHA512 (dnf-4.0.9.tar.gz) = c8c1e58a74befd5c27f64a3647a2b29c228db5238bab85cd2aa635c6b50e883c8da66c5c36f57dcc513d0dfd0888a1680a311a685bd35105415c5d642d1a7dc7