Update to 4.0.4-1
This commit is contained in:
parent
91fa4f9c53
commit
2824499cf3
1
.gitignore
vendored
1
.gitignore
vendored
@ -121,3 +121,4 @@
|
||||
/dnf-3.5.0.tar.gz
|
||||
/dnf-3.5.1.tar.gz
|
||||
/dnf-3.6.1.tar.gz
|
||||
/dnf-4.0.4.tar.gz
|
||||
|
@ -1,99 +0,0 @@
|
||||
From 55ea10083506f58b0eb2d9e302df235414a140c1 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Thu, 2 Aug 2018 15:06:00 +0200
|
||||
Subject: [PATCH 1/2] Solves problem with "dnf upgrade" if
|
||||
base.conf.obsoletes=True
|
||||
|
||||
In this case obsoletes were always applied.
|
||||
---
|
||||
dnf/base.py | 63 ++++++++++++++++++++++++-----------------------------
|
||||
1 file changed, 28 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dnf/base.py b/dnf/base.py
|
||||
index 57b1663d..3ec3fba6 100644
|
||||
--- a/dnf/base.py
|
||||
+++ b/dnf/base.py
|
||||
@@ -1919,6 +1919,26 @@ class Base(object):
|
||||
logger.warning(msg, pkg.name)
|
||||
return 0
|
||||
|
||||
+ def _upgrade_internal(self, query, obsoletes, reponame, pkg_spec=None):
|
||||
+ installed = self.sack.query().installed()
|
||||
+ q = query.intersection(self.sack.query().filterm(name=[pkg.name for pkg in installed]))
|
||||
+ if obsoletes:
|
||||
+ obsoletes = self.sack.query().available().filterm(obsoletes=q.installed.union(q.upgrades()))
|
||||
+ # add obsoletes into transaction
|
||||
+ q = q.union(obsoletes)
|
||||
+ # provide only available packages to solver otherwise selection of available
|
||||
+ # possibilities will be ignored
|
||||
+ q = q.available()
|
||||
+ if reponame is not None:
|
||||
+ q.filterm(reponame=reponame)
|
||||
+ q = self._merge_update_filters(q, pkg_spec=pkg_spec)
|
||||
+ if q:
|
||||
+ sltr = dnf.selector.Selector(self.sack)
|
||||
+ sltr.set(pkg=q)
|
||||
+ self._goal.upgrade(select=sltr)
|
||||
+ return 1
|
||||
+
|
||||
+
|
||||
def upgrade(self, pkg_spec, reponame=None):
|
||||
# :api
|
||||
subj = dnf.subject.Subject(pkg_spec)
|
||||
@@ -1941,45 +1961,18 @@ class Base(object):
|
||||
if not installed.filter(arch=solution['nevra'].arch):
|
||||
msg = _('Package %s available, but installed for different architecture.')
|
||||
logger.warning(msg, "{}.{}".format(pkg_name, solution['nevra'].arch))
|
||||
-
|
||||
- if self.conf.obsoletes and solution['nevra'] and solution['nevra'].has_just_name():
|
||||
- obsoletes = self.sack.query().filterm(obsoletes=q.installed())
|
||||
- # provide only available packages to solver otherwise selection of available
|
||||
- # possibilities will be ignored
|
||||
- q = q.available()
|
||||
- # add obsoletes into transaction
|
||||
- q = q.union(obsoletes)
|
||||
- else:
|
||||
- q = q.available()
|
||||
- if reponame is not None:
|
||||
- q.filterm(reponame=reponame)
|
||||
- q = self._merge_update_filters(q, pkg_spec=pkg_spec)
|
||||
- if q:
|
||||
- sltr = dnf.selector.Selector(self.sack)
|
||||
- sltr.set(pkg=q)
|
||||
- self._goal.upgrade(select=sltr)
|
||||
- return 1
|
||||
-
|
||||
+ obsoletes = self.conf.obsoletes and solution['nevra'] \
|
||||
+ and solution['nevra'].has_just_name()
|
||||
+ return self._upgrade_internal(q, obsoletes, reponame, pkg_spec)
|
||||
raise dnf.exceptions.MarkingError(_('No match for argument: %s') % pkg_spec, pkg_spec)
|
||||
|
||||
def upgrade_all(self, reponame=None):
|
||||
# :api
|
||||
- if reponame is None and not self._update_security_filters:
|
||||
- self._goal.upgrade_all()
|
||||
- else:
|
||||
- # provide only available packages to solver otherwise selection of available
|
||||
- # possibilities will be ignored
|
||||
- q = self.sack.query().available()
|
||||
- # add obsoletes into transaction
|
||||
- if self.conf.obsoletes:
|
||||
- q = q.union(self.sack.query().filterm(obsoletes=self.sack.query().installed()))
|
||||
- if reponame is not None:
|
||||
- q.filterm(reponame=reponame)
|
||||
- q = self._merge_update_filters(q)
|
||||
- sltr = dnf.selector.Selector(self.sack)
|
||||
- sltr.set(pkg=q)
|
||||
- self._goal.upgrade(select=sltr)
|
||||
- return 1
|
||||
+ # provide only available packages to solver to trigger targeted upgrade
|
||||
+ # possibilities will be ignored
|
||||
+ # usage of selected packages will unify dnf behavior with other upgrade functions
|
||||
+ return self._upgrade_internal(
|
||||
+ self.sack.query(), self.conf.obsoletes, reponame, pkg_spec=None)
|
||||
|
||||
def distro_sync(self, pkg_spec=None):
|
||||
if pkg_spec is None:
|
||||
--
|
||||
2.19.0
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 2de14efc0c535f10691ff1738caa8c76661e12f3 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Fri, 5 Oct 2018 09:38:30 +0200
|
||||
Subject: [PATCH 2/2] Fix problem with upgrade in dnf
|
||||
|
||||
---
|
||||
dnf/base.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dnf/base.py b/dnf/base.py
|
||||
index 3ec3fba6..b2628150 100644
|
||||
--- a/dnf/base.py
|
||||
+++ b/dnf/base.py
|
||||
@@ -1923,7 +1923,8 @@ class Base(object):
|
||||
installed = self.sack.query().installed()
|
||||
q = query.intersection(self.sack.query().filterm(name=[pkg.name for pkg in installed]))
|
||||
if obsoletes:
|
||||
- obsoletes = self.sack.query().available().filterm(obsoletes=q.installed.union(q.upgrades()))
|
||||
+ obsoletes = self.sack.query().available().filterm(
|
||||
+ obsoletes=q.installed().union(q.upgrades()))
|
||||
# add obsoletes into transaction
|
||||
q = q.union(obsoletes)
|
||||
# provide only available packages to solver otherwise selection of available
|
||||
--
|
||||
2.19.0
|
||||
|
33
dnf.spec
33
dnf.spec
@ -1,11 +1,11 @@
|
||||
# default dependencies
|
||||
%global hawkey_version 0.20.0
|
||||
%global hawkey_version 0.22.0
|
||||
%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.0.4
|
||||
%global conflicts_dnf_plugins_core_version 3.1
|
||||
%global conflicts_dnf_plugins_extras_version 3.0.2
|
||||
%global conflicts_dnfdaemon_version 0.3.19
|
||||
|
||||
@ -72,17 +72,13 @@
|
||||
It supports RPMs, modules and comps groups & environments.
|
||||
|
||||
Name: dnf
|
||||
Version: 3.6.1
|
||||
Release: 3%{?dist}
|
||||
Version: 4.0.4
|
||||
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
|
||||
# Backported fixes for https://bugzilla.redhat.com/show_bug.cgi?id=1616118
|
||||
# from upstream master
|
||||
Patch0: 0001-Solves-problem-with-dnf-upgrade-if-base.conf.obsolet.patch
|
||||
Patch1: 0002-Fix-problem-with-upgrade-in-dnf.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gettext
|
||||
@ -147,11 +143,6 @@ Provides: %{name}-conf = %{version}-%{release}
|
||||
Common data and configuration files for DNF
|
||||
|
||||
%package -n %{yum_subpackage_name}
|
||||
# DNF == YUM4; prefix version with 4.0 to make it higher than any version of YUM3
|
||||
# save and restore version, otherwise setting Version affects other sub-packages
|
||||
%global pkg_version %{version}
|
||||
Version: 4.0.%{version}
|
||||
%global version %{pkg_version}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: %{pkg_summary}
|
||||
%if 0%{?fedora}
|
||||
@ -180,15 +171,20 @@ Requires: libmodulemd >= %{libmodulemd_version}
|
||||
%if (0%{?rhel} && 0%{?rhel} <= 7)
|
||||
BuildRequires: pygpgme
|
||||
Requires: pygpgme
|
||||
BuildRequires: python-enum34
|
||||
Requires: python-enum34
|
||||
%else
|
||||
BuildRequires: python2-gpg
|
||||
Requires: python2-gpg
|
||||
BuildRequires: python2-enum34
|
||||
Requires: python2-enum34
|
||||
%endif
|
||||
BuildRequires: pyliblzma
|
||||
Requires: pyliblzma
|
||||
Requires: %{name}-data = %{version}-%{release}
|
||||
%if 0%{?fedora}
|
||||
Recommends: deltarpm
|
||||
Recommends: python2-unbound
|
||||
%endif
|
||||
%if 0%{?centos}
|
||||
Requires: deltarpm
|
||||
@ -244,6 +240,7 @@ Requires: python3-libcomps >= %{libcomps_version}
|
||||
Requires: python3-libdnf
|
||||
BuildRequires: python3-rpm >= %{rpm_version}
|
||||
Requires: python3-rpm >= %{rpm_version}
|
||||
Recommends: python3-unbound
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
Requires: rpm-plugin-systemd-inhibit
|
||||
%else
|
||||
@ -431,12 +428,10 @@ ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars
|
||||
%{_sysconfdir}/yum/pluginconf.d
|
||||
%{_sysconfdir}/yum/protected.d
|
||||
%{_sysconfdir}/yum/vars
|
||||
%{_mandir}/man1/repoquery.1.*
|
||||
%{_mandir}/man5/yum.conf.5.*
|
||||
%{_mandir}/man8/yum.8*
|
||||
%{_mandir}/man8/yum-shell.8*
|
||||
%else
|
||||
%exclude %{_mandir}/man1/repoquery.1.*
|
||||
%exclude %{_mandir}/man8/yum-shell.8*
|
||||
%exclude %{_sysconfdir}/yum/pluginconf.d
|
||||
%exclude %{_sysconfdir}/yum/protected.d
|
||||
@ -499,6 +494,14 @@ ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Oct 15 2018 Jaroslav Mracek <jmracek@redhat.com> - 4.0.4-1
|
||||
- Update to 4.0.4
|
||||
- Add dnssec extension
|
||||
- Set termforce to AUTO to automatically detect if stdout is terminal
|
||||
- Repoquery command accepts --changelogs option (RhBug:1483458)
|
||||
- Calculate sack version from all installed packages (RhBug:1624291)
|
||||
- [module] Allow to enable module dependencies (RhBug:1622566)
|
||||
|
||||
* Tue Oct 09 2018 Adam Williamson <awilliam@redhat.com> - 3.6.1-3
|
||||
- Backport fixes for RHBZ#1616118 from upstream master
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (dnf-3.6.1.tar.gz) = ba253b8c37b594f5be62cc0f7a6ec26b70b2b54e53bbcc0a869c17b41da138839c08252af9a4553976b2b0ffc1f20ae4664bd0e688229fbbb0669d27474aba54
|
||||
SHA512 (dnf-4.0.4.tar.gz) = b58c8f8b109d621fc58a24f85b387829686773bed1dc4761c75ee4649387ec599e2b650b119ad29a587a91f66b9c9d416bb7001f058f3c86260f8329a7ea8f99
|
||||
|
Loading…
Reference in New Issue
Block a user