Compare commits

...

8 Commits
master ... f27

Author SHA1 Message Date
Jaroslav Mracek a1b7939ba0 Fix problem with demands.cacheonly
Important for system-upgrade
2017-11-29 10:43:12 +01:00
Igor Gnatenko b734e6628c Update to 2.7.5
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
(cherry picked from commit 59848d2f76)
2017-10-18 20:58:33 +02:00
Jaroslav Mracek 73eb9b4d4d Update to 2.7.4-1 2017-10-16 10:48:06 +02:00
Igor Gnatenko f1c82afda4 Update to 2.7.3
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
(cherry picked from commit e3b4dd9074)
2017-10-06 16:31:11 +02:00
Jaroslav Mracek 300c98f97d Release of dnf-2.7.2-1
Also adds disabling if rich-deps that are disabled in master
2017-10-02 11:02:40 +02:00
Jaroslav Mracek 8506415eaa Release of 2.6.3-12
Add pre_configure() for commands
2017-09-22 11:13:33 +02:00
Jeroen van Meeuwen f2d88036db Obey repository priority configuration 2017-09-13 18:59:42 +02:00
Jaroslav Mracek 76462eacb0 Apply patch to fix missing services for dnf-automatic
https://bugzilla.redhat.com/show_bug.cgi?id=1489595
2017-09-13 11:26:45 +02:00
7 changed files with 191 additions and 25 deletions

4
.gitignore vendored
View File

@ -100,3 +100,7 @@
/dnf-2.5.1.tar.gz
/dnf-2.6.2.tar.gz
/dnf-2.6.3.tar.gz
/dnf-2.7.2.tar.gz
/dnf-2.7.3.tar.gz
/dnf-2.7.4.tar.gz
/dnf-2.7.5.tar.gz

View File

@ -0,0 +1,32 @@
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

View File

@ -0,0 +1,25 @@
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

View File

@ -0,0 +1,44 @@
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

View File

@ -1,7 +0,0 @@
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 077459a..ac0e365 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1 +1 @@
-ADD_TEST(test nosetests-${PYTHON_MAJOR_DOT_MINOR_VERSION} -s ${CMAKE_CURRENT_SOURCE_DIR})
+ADD_TEST(test ${PYTHON_EXECUTABLE} -m nose -s ${CMAKE_CURRENT_SOURCE_DIR})

102
dnf.spec
View File

@ -1,4 +1,4 @@
%global hawkey_version 0.9.3
%global hawkey_version 0.10.1
%global librepo_version 1.7.19
%global libcomps_version 0.1.8
%global rpm_version 4.13.0-0.rc1.29
@ -50,17 +50,16 @@
%global _docdir_fmt %{name}
Name: dnf
Version: 2.6.3
Release: 4%{?dist}
Version: 2.7.5
Release: 2%{?dist}
Summary: Package manager forked from Yum, using libsolv as a dependency resolver
# For a breakdown of the licensing, see PACKAGE-LICENSING
License: GPLv2+ and GPLv2 and GPL
URL: https://github.com/rpm-software-management/dnf
# git clone https://github.com/rpm-software-management/dnf
# cd dnf
# tito build --tgz --tag=dnf-2.5.1-1
Source0: %{name}-%{version}.tar.gz
Patch0: %{name}-nose-use-module.patch
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0001-Allow-to-set-cacheonly-from-commands-and-conf-RhBug-.patch
Patch1: 0002-Remove-redundant-conf-option-cacheonly.patch
Patch2: 0003-Remove-unnecessary-code-for-set-cacheonly.patch
BuildArch: noarch
BuildRequires: cmake
BuildRequires: gettext
@ -74,17 +73,19 @@ Requires: %{dnf_python}-%{name} = %{version}-%{release}
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires: python-dbus
%else
%if %{with platform_python}
#if %%{with platform_python}
# TODO: use rich deps once it is allowed
#Recommends: (pythonX-dbus if NetworkManager)
Recommends: platform-python-dbus
%else
# platform-python-dbus doesn't exist
#Requires: (platform-python-dbus if NetworkManager)
#else
%if %{with python3}
#Recommends: (python3-dbus if NetworkManager)
Recommends: python3-dbus
%else
#Recommends: (python2-dbus if NetworkManager)
Recommends: python2-dbus
%endif
%endif
#endif
%endif
Requires(post): systemd
@ -163,7 +164,6 @@ BuildRequires: python-nose
BuildRequires: python2-gpg
Requires: python2-gpg
BuildRequires: pyliblzma
BuildRequires: rpm-python >= %{rpm_version}
Requires: pyliblzma
Requires: %{name}-conf = %{version}-%{release}
Requires: deltarpm
@ -172,11 +172,14 @@ Requires: python-iniparse
Requires: python-libcomps >= %{libcomps_version}
Requires: python-librepo >= %{librepo_version}
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: rpm-python >= %{rpm_version}
Requires: rpm-python >= %{rpm_version}
Requires: rpm-plugin-systemd-inhibit
%else
BuildRequires: python2-rpm >= %{rpm_version}
Requires: python2-rpm >= %{rpm_version}
Recommends: rpm-plugin-systemd-inhibit
%endif
Requires: rpm-python >= %{rpm_version}
# dnf-langpacks package is retired in F25
# to have clean upgrade path for dnf-langpacks
Obsoletes: python-dnf-langpacks < %{dnf_langpacks_ver}
@ -197,7 +200,6 @@ BuildRequires: python3-librepo >= %{librepo_version}
BuildRequires: python3-nose
BuildRequires: python3-gpg
Requires: python3-gpg
BuildRequires: rpm-python3 >= %{rpm_version}
Requires: %{name}-conf = %{version}-%{release}
Requires: deltarpm
Requires: python3-hawkey >= %{hawkey_version}
@ -205,11 +207,14 @@ Requires: python3-iniparse
Requires: python3-libcomps >= %{libcomps_version}
Requires: python3-librepo >= %{librepo_version}
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: rpm-python3 >= %{rpm_version}
Requires: rpm-python3 >= %{rpm_version}
Requires: rpm-plugin-systemd-inhibit
%else
BuildRequires: python3-rpm >= %{rpm_version}
Requires: python3-rpm >= %{rpm_version}
Recommends: rpm-plugin-systemd-inhibit
%endif
Requires: rpm-python3 >= %{rpm_version}
# dnf-langpacks package is retired in F25
# to have clean upgrade path for dnf-langpacks
Obsoletes: python3-dnf-langpacks < %{dnf_langpacks_ver}
@ -404,16 +409,19 @@ popd
%systemd_postun_with_restart dnf-makecache.timer
%post automatic
%systemd_post dnf-automatic.timer
%systemd_post dnf-automatic-notifyonly.timer
%systemd_post dnf-automatic-download.timer
%systemd_post dnf-automatic-install.timer
%preun automatic
%systemd_preun dnf-automatic.timer
%systemd_preun dnf-automatic-notifyonly.timer
%systemd_preun dnf-automatic-download.timer
%systemd_preun dnf-automatic-install.timer
%postun automatic
%systemd_postun_with_restart dnf-automatic.timer
%systemd_postun_with_restart dnf-automatic-notifyonly.timer
%systemd_postun_with_restart dnf-automatic-download.timer
%systemd_postun_with_restart dnf-automatic-install.timer
@ -497,6 +505,8 @@ popd
%{_bindir}/%{name}-automatic
%config(noreplace) %{confdir}/automatic.conf
%{_mandir}/man8/%{name}.automatic.8*
%{_unitdir}/%{name}-automatic.service
%{_unitdir}/%{name}-automatic.timer
%{_unitdir}/%{name}-automatic-notifyonly.service
%{_unitdir}/%{name}-automatic-notifyonly.timer
%{_unitdir}/%{name}-automatic-download.service
@ -516,6 +526,64 @@ popd
%endif
%changelog
* Wed Nov 29 2017 Jaroslav Mracek <jmracek@redhat.com> - 2.7.5-2
- Fix problem with demands.cacheonly that caused problems for system-upgrade
* Wed Oct 18 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.7.5-1
- Improve performance for excludes and includes handling (RHBZ #1500361)
- Fixed problem of handling checksums for local repositories (RHBZ #1502106)
- Fix traceback when using dnf.Base.close() (RHBZ #1503575)
* Mon Oct 16 2017 Jaroslav Mracek <jmracek@redhat.com> - 2.7.4-1
- Update to 2.7.4-1
- Enhanced performance for excludes and includes handling
- Solved memory leaks at time of closing of dnf.Base()
- Resolves: rhbz#1480979 - I thought it abnormal that dnf crashed.
- Resolves: rhbz#1461423 - Memory leak in python-dnf
- Resolves: rhbz#1499564 - dnf list installed crashes
- Resolves: rhbz#1499534 - dnf-2 is much slower than dnf-1 when handling groups
- Resolves: rhbz#1499623 - Mishandling stderr vs stdout (dnf search, dnf repoquery)
* Fri Oct 06 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.7.3-1
- Fix URL detection (RHBZ #1472847)
- Do not remove downloaded files with --destdir option (RHBZ #1498426)
- Fix handling of conditional packages in comps (RHBZ #1427144)
* Mon Oct 02 2017 Jaroslav Mracek <jmracek@redhat.com> - 2.7.2-1
- Update to 2.7.2-1
- Added new option ``--comment=<comment>`` that adds a comment to transaction in history
- :meth:`dnf.Base.pre_configure_plugin` configure plugins by running their pre_configure() method
- Added pre_configure() methotd for plugins and commands to configure dnf before repos are loaded
- Resolves: rhbz#1421478 - dnf repository-packages: error: unrecognized arguments: -x rust-rpm-macros
- Resolves: rhbz#1491560 - 'dnf check' reports spurious "has missing requires of" errors
- Resolves: rhbz#1465292 - DNF remove protected duplicate package
- Resolves: rhbz#1279001 - [RFE] Missing dnf --downloaddir option
- Resolves: rhbz#1212341 - [RFE] Allow plugins to override the core configuration
- Resolves: rhbz#1299482 - mock --init fails with message "Failed calculating RPMDB checksum"
- Resolves: rhbz#1488398 - dnf upstream tests failures on f26
- Resolves: rhbz#1192811 - dnf whatprovides should show which provides matched a pattern
- Resolves: rhbz#1288845 - "dnf provides" wildcard matching is unreliable (not all packages with matches listed)
- Resolves: rhbz#1473933 - [abrt] dnf-automatic: resolved(): rpm_conf.py:58:resolved:AttributeError: 'Rpmconf' object has no attribute '_interactive'
- Resolves: rhbz#1237349 - dnf autoremove not removing what dnf list extras shows
- Resolves: rhbz#1470050 - the 'priority=' option in /etc/yum.repos.d/*.repo is not respected
- Resolves: rhbz#1347927 - dnf --cacheonly downloads packages
- Resolves: rhbz#1478115 - [abrt] dnf: _hcmd_undo(): __init__.py:888:_hcmd_undo:IndexError: list index out of range
- Resolves: rhbz#1461171 - RFE: support --advisory= with install
- Resolves: rhbz#1448874 - "dnf needs-restarting" vanished from bash completion
- Resolves: rhbz#1495116 - Dnf version fails with traceback in container
* Tue Sep 26 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.6.3-13
- Don't use rich deps for now
* Fri Sep 22 2017 Jaroslav Mracek <jmracek@redhat.com> - 2.6.3-12
- Added support for command pre_configuration
* Wed Sep 13 2017 Jeroen van Meeuwen <kanarip@fedoraproject.org> - 2.6.3-11
- Added patch to obey repository priority configuration
* Wed Sep 13 2017 Jaroslav Mracek <jmracek@redhat.com> - 2.6.3-10
- Added patch to add services for dnf-automatic that were previously removed
* Tue Aug 22 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.3-4
- Add %%dnf_python macro that selects what dnf runs on
- Enable platform_python once again, but set %%dnf_python to python3

View File

@ -1 +1 @@
SHA512 (dnf-2.6.3.tar.gz) = 9926790479d61b4a3400c416cb3a06b7f5bbeb081a0be05616db8c246cf535f748de4d56983a97583d71757802d78c56fbe70f639e683158613a724d03cb6eba
SHA512 (dnf-2.7.5.tar.gz) = ef40385b48084d2b3b5711cf06f5080be5a16f44d6c30fd48a2691346fe4b5c6a1afce8b722b9fef8322f49c2eab871a7ad3a4cc649b023f18722efc1e805f90