Compare commits

...

2 Commits
master ... f23

Author SHA1 Message Date
Igor Gnatenko
171a7916b4 add sources
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
(cherry picked from commit 3def2e5d3d)
2016-08-18 16:31:42 +02:00
Igor Gnatenko
91179be3a9 Update to 1.1.10
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
(cherry picked from commit 4dd736df98)
2016-08-18 16:28:10 +02:00
6 changed files with 17 additions and 268 deletions

1
.gitignore vendored
View File

@ -87,3 +87,4 @@
/dnf-1.1.7.tar.gz
/dnf-1.1.8.tar.gz
/dnf-1.1.9.tar.gz
/dnf-1.1.10-1.tar.gz

View File

@ -1,179 +0,0 @@
From 8e9d4b5d27982da1c09ff81c3c8bc93349e968cd Mon Sep 17 00:00:00 2001
From: Michal Luscon <mluscon@redhat.com>
Date: Tue, 24 May 2016 16:30:20 +0200
Subject: [PATCH 3/3] Revert "group: treat mandatory pkgs as mandatory if
strict=true" (RhBug:1337731)
This reverts commit f0f6488e86e39b574c7d552d8a6c1aa6d09c5852.
---
dnf/base.py | 4 +---
dnf/cli/commands/group.py | 10 +---------
dnf/persistor.py | 3 ---
tests/repos/main_comps.xml | 8 --------
tests/support.py | 2 +-
tests/test_comps.py | 6 +++---
tests/test_groups.py | 23 +----------------------
7 files changed, 7 insertions(+), 49 deletions(-)
diff --git a/dnf/base.py b/dnf/base.py
index 7943c8a..7bb3a26 100644
--- a/dnf/base.py
+++ b/dnf/base.py
@@ -1208,14 +1208,12 @@ class Base(object):
for it in attr:
if not self.sack.query().filter(name=it):
# a comps item that doesn't refer to anything real
- if (attr == trans.install):
- self._group_persistor._rollback()
- raise dnf.exceptions.MarkingError(it)
continue
sltr = dnf.selector.Selector(self.sack)
sltr.set(name=it)
fn(select=sltr)
cnt += 1
+
self._goal.group_members.update(trans.install)
self._goal.group_members.update(trans.install_opt)
return cnt
diff --git a/dnf/cli/commands/group.py b/dnf/cli/commands/group.py
index d28f84c..510c539 100644
--- a/dnf/cli/commands/group.py
+++ b/dnf/cli/commands/group.py
@@ -404,15 +404,7 @@ class GroupCommand(commands.Command):
if cmd == 'install':
types, patterns = self._split_extcmds(extcmds)
self._remark = True
- try:
- return self.base.env_group_install(patterns, types,
- self.base.conf.strict)
- except dnf.exceptions.MarkingError as e:
- msg = _('No package %s%s%s available.')
- logger.info(msg, self.base.output.term.MODE['bold'], e,
- self.base.output.term.MODE['normal'])
- raise dnf.exceptions.PackagesNotAvailableError(
- _("Unable to find a mandatory group package."))
+ return self.base.env_group_install(patterns, types)
if cmd == 'upgrade':
return self.base.env_group_upgrade(extcmds)
if cmd == 'remove':
diff --git a/dnf/persistor.py b/dnf/persistor.py
index 367343c..5d54895 100644
--- a/dnf/persistor.py
+++ b/dnf/persistor.py
@@ -356,9 +356,6 @@ class GroupPersistor(object):
for id_ in del_list:
del members_dct[id_]
- def _rollback(self):
- self.db = self._original.clone()
-
def commit(self):
self._commit = True
diff --git a/tests/repos/main_comps.xml b/tests/repos/main_comps.xml
index 3cf8faa..67fc6c7 100644
--- a/tests/repos/main_comps.xml
+++ b/tests/repos/main_comps.xml
@@ -39,14 +39,6 @@
<packagereq>lotus</packagereq>
</packagelist>
</group>
- <group>
- <id>broken-group</id>
- <name>Broken Group</name>
- <packagelist>
- <packagereq type="mandatory">meaning-of-life</packagereq>
- <packagereq>lotus</packagereq>
- </packagelist>
- </group>
<category>
<id>base-system</id>
<display_order>99</display_order>
diff --git a/tests/support.py b/tests/support.py
index 584e7fe..275549c 100644
--- a/tests/support.py
+++ b/tests/support.py
@@ -82,7 +82,7 @@ SYSTEM_NSOLVABLES = TOTAL_RPMDB_COUNT
MAIN_NSOLVABLES = 9
UPDATES_NSOLVABLES = 4
AVAILABLE_NSOLVABLES = MAIN_NSOLVABLES + UPDATES_NSOLVABLES
-TOTAL_GROUPS = 4
+TOTAL_GROUPS = 3
TOTAL_NSOLVABLES = SYSTEM_NSOLVABLES + AVAILABLE_NSOLVABLES
# testing infrastructure
diff --git a/tests/test_comps.py b/tests/test_comps.py
index 576e801..07a65ab 100644
--- a/tests/test_comps.py
+++ b/tests/test_comps.py
@@ -100,7 +100,7 @@ class CompsTest(support.TestCase):
def test_iteration(self):
comps = self.comps
self.assertEqual([g.name for g in comps.groups_iter()],
- ['Base', 'Solid Ground', "Pepper's", "Broken Group"])
+ ['Base', 'Solid Ground', "Pepper's"])
self.assertEqual([c.name for c in comps.categories_iter()],
['Base System'])
g = dnf.util.first(comps.groups_iter())
@@ -108,7 +108,7 @@ class CompsTest(support.TestCase):
def test_group_display_order(self):
self.assertEqual([g.name for g in self.comps.groups],
- ["Pepper's", 'Base', 'Solid Ground', 'Broken Group'])
+ ["Pepper's", 'Base', 'Solid Ground'])
def test_packages(self):
comps = self.comps
@@ -120,7 +120,7 @@ class CompsTest(support.TestCase):
def test_size(self):
comps = self.comps
- self.assertLength(comps, 6)
+ self.assertLength(comps, 5)
self.assertLength(comps.groups, support.TOTAL_GROUPS)
self.assertLength(comps.categories, 1)
self.assertLength(comps.environments, 1)
diff --git a/tests/test_groups.py b/tests/test_groups.py
index 1986c0d..83f66d8 100644
--- a/tests/test_groups.py
+++ b/tests/test_groups.py
@@ -68,7 +68,7 @@ class EmptyPersistorTest(support.ResultTestCase):
self.assertEmpty(removed)
trans = dnf.comps.TransactionBunch()
- trans.install_opt.add('waltz')
+ trans.install.add('waltz')
self.assertEqual(self.base._add_comps_trans(trans), 0)
@@ -121,27 +121,6 @@ class PresetPersistorTest(support.ResultTestCase):
self.assertEmpty(removed)
self.assertTrue(p_grp.installed)
- def test_group_install_broken(self):
- prst = self.base._group_persistor
- grp = self.base.comps.group_by_pattern('Broken Group')
- p_grp = prst.group('broken-group')
- self.assertFalse(p_grp.installed)
-
- self.assertRaises(dnf.exceptions.MarkingError,
- self.base.group_install, grp.id,
- ('mandatory', 'default'))
- p_grp = prst.group('broken-group')
- self.assertFalse(p_grp.installed)
-
- self.assertEquals(self.base.group_install(grp.id,
- ('mandatory', 'default'),
- strict=False), 1)
- inst, removed = self.installed_removed(self.base)
- self.assertLength(inst, 1)
- self.assertEmpty(removed)
- p_grp = prst.group('broken-group')
- self.assertTrue(p_grp.installed)
-
def test_group_remove(self):
prst = self.base._group_persistor
grp_ids = prst.groups_by_pattern('somerset')
--
2.7.4

View File

@ -22,16 +22,13 @@
%global _docdir_fmt %{name}
Name: dnf
Version: 1.1.9
Release: 2%{?dist}
Version: 1.1.10
Release: 1%{?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
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
Patch0: enforce-api-reflect-changes-from-992475-in-completio.patch
Patch1: enforce-api-add-compatibility-methods-for-renamed-co.patch
Patch2: Revert-group-treat-mandatory-pkgs-as-mandatory-if-st.patch
Source0: %{url}/archive/%{name}-%{version}-1.tar.gz
BuildArch: noarch
BuildRequires: cmake
BuildRequires: gettext
@ -96,7 +93,11 @@ BuildRequires: python-iniparse
BuildRequires: python-libcomps >= %{libcomps_version}
BuildRequires: python-librepo >= %{librepo_version}
BuildRequires: python-nose
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: pygpgme
%else
BuildRequires: python2-pygpgme
%endif
BuildRequires: pyliblzma
BuildRequires: rpm-python >= %{rpm_version}
Recommends: bash-completion
@ -107,10 +108,13 @@ Requires: python-hawkey >= %{hawkey_version}
Requires: python-iniparse
Requires: python-libcomps >= %{libcomps_version}
Requires: python-librepo >= %{librepo_version}
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires: pygpgme
%else
Requires: python2-pygpgme
%endif
Requires: rpm-plugin-systemd-inhibit
Requires: rpm-python >= %{rpm_version}
Obsoletes: %{name} <= 0.6.4
%description -n python2-%{name}
Python 2 interface to DNF.
@ -137,7 +141,6 @@ Requires: python3-librepo >= %{librepo_version}
Requires: python3-pygpgme
Requires: rpm-plugin-systemd-inhibit
Requires: rpm-python3 >= %{rpm_version}
Obsoletes: %{name} <= 0.6.4
%description -n python3-%{name}
Python 3 interface to DNF.
@ -155,7 +158,7 @@ Requires(postun): systemd
Alternative CLI to "dnf upgrade" suitable for automatic, regular execution.
%prep
%autosetup -p1
%autosetup -n %{name}-%{name}-%{version}-1
mkdir build
%if %{with python3}
mkdir build-py3
@ -312,6 +315,9 @@ exit 0
%endif
%changelog
* Thu Aug 18 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.1.10-1
- Update to 1.1.10
* Tue May 24 2016 Michal Luscon <mluscon@redhat.com> 1.1.9-2
- Revert "group: treat mandatory pkgs as mandatory if strict=true" (RhBug:1337731)
- enforce-api: reflect changes from #992475 in completion_helper (RhBug:1338504)

View File

@ -1,51 +0,0 @@
From 176a81e357b8e169008c831963c3b487b3bac40a Mon Sep 17 00:00:00 2001
From: Michal Luscon <mluscon@redhat.com>
Date: Tue, 24 May 2016 16:05:54 +0200
Subject: [PATCH 1/3] enforce-api: add compatibility methods for renamed
counterparts (RhBug:1338564)
---
dnf/base.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dnf/base.py b/dnf/base.py
index b2648f6..7943c8a 100644
--- a/dnf/base.py
+++ b/dnf/base.py
@@ -925,6 +925,10 @@ class Base(object):
self._add_tempfiles([path])
return self.sack.add_cmdline_package(path)
+ def _sigCheckPkg(self, po):
+ # :compat method
+ self._sig_check_pkg(po)
+
def _sig_check_pkg(self, po):
"""Verify the GPG signature of the given package object.
@@ -997,6 +1001,11 @@ class Base(object):
logger.log(dnf.logging.DDEBUG,
_('%s removed'), fn)
+ def _doPackageLists(self, pkgnarrow='all', patterns=None, showdups=None,
+ ignore_case=False, reponame=None):
+ # :compat method
+ self._do_package_lists(pkgnarrow, patterns, showdups, ignore_case, reponame)
+
def _do_package_lists(self, pkgnarrow='all', patterns=None, showdups=None,
ignore_case=False, reponame=None):
"""Return a :class:`misc.GenericHolder` containing
@@ -1802,6 +1811,10 @@ class Base(object):
else:
assert False
+ def _getKeyForPackage(self, po, askcb=None, fullaskcb=None):
+ # :compat method
+ self._get_key_for_package(po, askcb, fullaskcb)
+
def _get_key_for_package(self, po, askcb=None, fullaskcb=None):
"""Retrieve a key for a package. If needed, use the given
callback to prompt whether the key should be imported.
--
2.7.4

View File

@ -1,28 +0,0 @@
From b3b58ff94900f8b989c80b49fd2afec0fa502538 Mon Sep 17 00:00:00 2001
From: Michal Luscon <mluscon@redhat.com>
Date: Tue, 24 May 2016 16:08:50 +0200
Subject: [PATCH 2/3] enforce-api: reflect changes from #992475 in
completion_helper (RhBug:1338504)
---
dnf/cli/completion_helper.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dnf/cli/completion_helper.py b/dnf/cli/completion_helper.py
index 2ca0360..26b575e 100644
--- a/dnf/cli/completion_helper.py
+++ b/dnf/cli/completion_helper.py
@@ -169,8 +169,8 @@ def main(args):
base = dnf.cli.cli.BaseCli()
cli = dnf.cli.Cli(base)
if args[0] == "_cmds":
- base.plugins.load(base.conf.pluginpath, [])
- base.plugins.run_init(base, cli)
+ base._plugins.load(base.conf.pluginpath, [])
+ base._plugins.run_init(base, cli)
print("\n".join(filter_list_by_kw(args[1], cli.cli_commands)))
return
cli.cli_commands.clear()
--
2.7.4

View File

@ -1 +1 @@
c804c55f87611610e288d94a724749c1 dnf-1.1.9.tar.gz
c0effd3b40e21d471f39c9c8eeacd68a dnf-1.1.10-1.tar.gz