Update to 3.0.4
This commit is contained in:
parent
a847ec355e
commit
eabba36833
1
.gitignore
vendored
1
.gitignore
vendored
@ -114,3 +114,4 @@
|
||||
/dnf-3.0.1.tar.gz
|
||||
/dnf-3.0.2.tar.gz
|
||||
/dnf-3.0.3.tar.gz
|
||||
/dnf-3.0.4.tar.gz
|
||||
|
@ -1,32 +0,0 @@
|
||||
From bc11bf599ce3102656fa42b0ad0a6c7270822f30 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Mon, 27 Nov 2017 14:35:32 +0100
|
||||
Subject: [PATCH 1/3] Allow to set cacheonly from commands and conf
|
||||
(RhBug:1492036)
|
||||
|
||||
The formal code reacts only to --cacheonly option.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1492036
|
||||
---
|
||||
dnf/cli/cli.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
|
||||
index f60cdced..11fbed31 100644
|
||||
--- a/dnf/cli/cli.py
|
||||
+++ b/dnf/cli/cli.py
|
||||
@@ -741,7 +741,10 @@ class Cli(object):
|
||||
if not os.getegid() == 0:
|
||||
raise dnf.exceptions.Error(_('This command has to be run under the root user.'))
|
||||
|
||||
- if not demands.cacheonly:
|
||||
+ if demands.cacheonly or self.base.conf.cacheonly:
|
||||
+ self.base.conf.cacheonly = True
|
||||
+ repos.all()._md_only_cached = True
|
||||
+ else:
|
||||
if demands.freshest_metadata:
|
||||
for repo in repos.iter_enabled():
|
||||
repo._md_expire_cache()
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 4ca1555ab6ffb1b916094802440b84e74aca2eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Williamson <awilliam@redhat.com>
|
||||
Date: Fri, 13 Jul 2018 00:07:13 -0700
|
||||
Subject: [PATCH] dnf-makecache.timer: move to multi-user to fix loop
|
||||
|
||||
In ee96304, `After=network-online.target` was added to the
|
||||
dnf-makecache.timer service definition. However, it was already
|
||||
`WantedBy=basic.target`. These two requests are contradictory
|
||||
in Fedora and probably most distributions, as it seems that
|
||||
network-online.target requires NetworkManager.service, and
|
||||
NetworkManger.service requires basic.target. systemd is forced
|
||||
to break this loop somehow: my testing suggests that it usually
|
||||
does so by throwing dnf-makecache.timer out of the process, but
|
||||
sometimes does it by throwing NetworkManager out of the process,
|
||||
resulting in the network unexpectedly not coming up. See
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1600823 for more.
|
||||
|
||||
This commit resolves this simply having dnf-makecache.timer
|
||||
WantedBy multi-user.target, not basic.target. I don't think we
|
||||
*really* want DNF refreshing its caches in what is basically a
|
||||
recovery environment, after all, and NetworkManager itself is
|
||||
WantedBy multi-user.target, so if you actually only boot to
|
||||
basic.target, there is no network up at all after boot (I've
|
||||
tested this).
|
||||
|
||||
There are other options (e.g. dropping the After network-online
|
||||
ordering and just trusting the Wants and the ten-minute startup
|
||||
delay to be sufficient), but we certainly should resolve this
|
||||
one way or another.
|
||||
|
||||
Resolves: rhbz#1600823
|
||||
|
||||
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||
---
|
||||
etc/systemd/dnf-makecache.timer | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/etc/systemd/dnf-makecache.timer b/etc/systemd/dnf-makecache.timer
|
||||
index 72b6b78c..e3e612c8 100644
|
||||
--- a/etc/systemd/dnf-makecache.timer
|
||||
+++ b/etc/systemd/dnf-makecache.timer
|
||||
@@ -12,4 +12,4 @@ OnUnitInactiveSec=1h
|
||||
Unit=dnf-makecache.service
|
||||
|
||||
[Install]
|
||||
-WantedBy=basic.target
|
||||
+WantedBy=multi-user.target
|
||||
--
|
||||
2.18.0.rc2
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 777df1098f4215edb8339a56c1807c9217715142 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Mon, 27 Nov 2017 14:38:08 +0100
|
||||
Subject: [PATCH 2/3] Remove redundant conf option cacheonly
|
||||
|
||||
The option was defined twice in "dnf.conf".
|
||||
---
|
||||
dnf/conf/config.py | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/dnf/conf/config.py b/dnf/conf/config.py
|
||||
index f0c39665..f2098fc6 100644
|
||||
--- a/dnf/conf/config.py
|
||||
+++ b/dnf/conf/config.py
|
||||
@@ -778,7 +778,6 @@ class MainConf(BaseConfig):
|
||||
# runtime only options
|
||||
self._add_option('downloadonly', BoolOption(False, runtimeonly=True))
|
||||
self._add_option('ignorearch', BoolOption(False))
|
||||
- self._add_option('cacheonly', BoolOption(False))
|
||||
|
||||
@property
|
||||
def get_reposdir(self):
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,44 +0,0 @@
|
||||
From aebbc222b85a7949a705360ea51b7c987126c2d8 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Tue, 28 Nov 2017 09:21:40 +0100
|
||||
Subject: [PATCH 3/3] Remove unnecessary code for set cacheonly
|
||||
|
||||
Attribute repo._md_only_cached is set on different place during
|
||||
_progress_demands().
|
||||
---
|
||||
dnf/repo.py | 5 -----
|
||||
tests/test_cli.py | 2 --
|
||||
2 files changed, 7 deletions(-)
|
||||
|
||||
diff --git a/dnf/repo.py b/dnf/repo.py
|
||||
index e9ce597e..75a11a47 100644
|
||||
--- a/dnf/repo.py
|
||||
+++ b/dnf/repo.py
|
||||
@@ -858,11 +858,6 @@ class Repo(dnf.conf.RepoConf):
|
||||
else:
|
||||
return self._try_revive_by_repomd()
|
||||
|
||||
- def _configure_from_options(self, opts):
|
||||
- if getattr(opts, 'cacheonly', None):
|
||||
- self._md_only_cached = True
|
||||
- super(Repo, self)._configure_from_options(opts)
|
||||
-
|
||||
def disable(self):
|
||||
# :api
|
||||
self.enabled = False
|
||||
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
||||
index f4ea27ee..8963783a 100644
|
||||
--- a/tests/test_cli.py
|
||||
+++ b/tests/test_cli.py
|
||||
@@ -136,8 +136,6 @@ class CliTest(TestCase):
|
||||
self.assertTrue(self.base.repos['comb'].enabled)
|
||||
self.assertFalse(self.base.repos["comb"].gpgcheck)
|
||||
self.assertFalse(self.base.repos["comb"].repo_gpgcheck)
|
||||
- self.assertEqual(self.base.repos["comb"]._sync_strategy,
|
||||
- dnf.repo.SYNC_ONLY_CACHE)
|
||||
|
||||
def test_configure_repos_expired(self, _):
|
||||
"""Ensure that --cacheonly beats the expired status."""
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,33 +0,0 @@
|
||||
From 199fc9cb11ff004fc752b58b7177aaf8d7fcedfd Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <ngompa13@gmail.com>
|
||||
Date: Sat, 3 Mar 2018 12:44:54 -0500
|
||||
Subject: [PATCH] util: Correctly source errno.EEXIST
|
||||
|
||||
---
|
||||
dnf/util.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dnf/util.py b/dnf/util.py
|
||||
index ab7fd279..d0f1a4f2 100644
|
||||
--- a/dnf/util.py
|
||||
+++ b/dnf/util.py
|
||||
@@ -28,6 +28,7 @@ from functools import reduce
|
||||
import dnf
|
||||
import dnf.const
|
||||
import dnf.pycomp
|
||||
+import errno
|
||||
import itertools
|
||||
import librepo
|
||||
import locale
|
||||
@@ -120,7 +121,7 @@ def ensure_dir(dname):
|
||||
try:
|
||||
os.makedirs(dname, mode=0o755)
|
||||
except OSError as e:
|
||||
- if e.errno != os.errno.EEXIST or not os.path.isdir(dname):
|
||||
+ if e.errno != errno.EEXIST or not os.path.isdir(dname):
|
||||
raise e
|
||||
|
||||
def empty(iterable):
|
||||
--
|
||||
2.17.0
|
||||
|
26
dnf.spec
26
dnf.spec
@ -1,5 +1,5 @@
|
||||
# default dependencies
|
||||
%global hawkey_version 0.14.0
|
||||
%global hawkey_version 0.16.0
|
||||
%global librepo_version 1.9.0
|
||||
%global libcomps_version 0.1.8
|
||||
%global libmodulemd_version 1.4.0
|
||||
@ -73,8 +73,8 @@
|
||||
It supports RPMs, modules and comps groups & environments.
|
||||
|
||||
Name: dnf
|
||||
Version: 3.0.3
|
||||
Release: 4%{?dist}
|
||||
Version: 3.0.4
|
||||
Release: 1%{?dist}
|
||||
Summary: %{pkg_summary}
|
||||
# For a breakdown of the licensing, see PACKAGE-LICENSING
|
||||
License: GPLv2+ and GPLv2 and GPL
|
||||
@ -83,7 +83,6 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
# Avoid systemd dependency loop in dnf-makecache.timer
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1600823
|
||||
# https://github.com/rpm-software-management/dnf/commit/4ca1555ab6ffb1b916094802440b84e74aca2eb5
|
||||
Patch0: 0001-dnf-makecache.timer-move-to-multi-user-to-fix-loop.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gettext
|
||||
@ -148,6 +147,11 @@ 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}
|
||||
@ -405,6 +409,8 @@ rm -vf %{buildroot}%{_bindir}/dnf-automatic-*
|
||||
%dir %{confdir}/modules.d
|
||||
%dir %{confdir}/modules.defaults.d
|
||||
%dir %{pluginconfpath}
|
||||
%dir %{_sysconfdir}/%{name}/modules.d
|
||||
%dir %{_sysconfdir}/%{name}/modules.defaults.d
|
||||
%dir %{confdir}/protected.d
|
||||
%dir %{confdir}/vars
|
||||
%config(noreplace) %{confdir}/%{name}.conf
|
||||
@ -483,6 +489,18 @@ rm -vf %{buildroot}%{_bindir}/dnf-automatic-*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Jul 22 2018 Daniel Mach <dmach@redhat.com> - 3.0.4-1
|
||||
- [transaction] Fix 'TransactionItem not found for key' error.
|
||||
- [module] Allow removing module profile without specifying a stream.
|
||||
- [module] Fix 'BaseCli' object has no attribute '_yumdb' error.
|
||||
- [callback] Fix TransactionDisplay.PKG_ERASE redirect to a non-existing constant.
|
||||
- [spec] Change yum compat package version to 4.0.version.
|
||||
- [cache] Clean transaction temp files after successfull transaction
|
||||
- [log] Log messages from libdnf logger
|
||||
- [transaction] Add states to report rpm transaction progress
|
||||
- [transaction] Cache TransactionItem during handling of RPM callback (RhBug:1599597)
|
||||
- [systemd] dnf-makecache.timer: move to multi-user to fix loop
|
||||
|
||||
* Mon Jul 16 2018 Adam Williamson <awilliam@redhat.com> - 3.0.3-4
|
||||
- Backport fix for dnf-makecache.timer loop from git
|
||||
- Resolves: rhbz#1600823
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (dnf-3.0.3.tar.gz) = a7b31ed37f6a58679a6b10dc839adea128c519bb37be8b3bc0f5f3854c586bdd676cd692e9804853d78eccea914e3046550e7f5a3663ce9268eab44b839771be
|
||||
SHA512 (dnf-3.0.4.tar.gz) = 7e863df96d00dfeffa152163b18957934fe3f8f6a69bad25ffd81245ac1485709a4b0ac98458280e487b3e2b516b86f9eee3e985a7556d012bfee8d89fe1bbfd
|
||||
|
Loading…
Reference in New Issue
Block a user