Bugfix release 1.1.9-2
This commit is contained in:
parent
9c312c7cb7
commit
c3ada3186d
179
Revert-group-treat-mandatory-pkgs-as-mandatory-if-st.patch
Normal file
179
Revert-group-treat-mandatory-pkgs-as-mandatory-if-st.patch
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
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
|
||||||
|
|
12
dnf.spec
12
dnf.spec
@ -23,12 +23,15 @@
|
|||||||
|
|
||||||
Name: dnf
|
Name: dnf
|
||||||
Version: 1.1.9
|
Version: 1.1.9
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Package manager forked from Yum, using libsolv as a dependency resolver
|
Summary: Package manager forked from Yum, using libsolv as a dependency resolver
|
||||||
# For a breakdown of the licensing, see PACKAGE-LICENSING
|
# For a breakdown of the licensing, see PACKAGE-LICENSING
|
||||||
License: GPLv2+ and GPLv2 and GPL
|
License: GPLv2+ and GPLv2 and GPL
|
||||||
URL: https://github.com/rpm-software-management/dnf
|
URL: https://github.com/rpm-software-management/dnf
|
||||||
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
|
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
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
@ -152,7 +155,7 @@ Requires(postun): systemd
|
|||||||
Alternative CLI to "dnf upgrade" suitable for automatic, regular execution.
|
Alternative CLI to "dnf upgrade" suitable for automatic, regular execution.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup -p1
|
||||||
mkdir build
|
mkdir build
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
mkdir build-py3
|
mkdir build-py3
|
||||||
@ -309,6 +312,11 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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)
|
||||||
|
- enforce-api: add compatibility methods for renamed counterparts (RhBug:1338564)
|
||||||
|
|
||||||
* Thu May 19 2016 Igor Gnatenko <ignatenko@redhat.com> 1.1.9-1
|
* Thu May 19 2016 Igor Gnatenko <ignatenko@redhat.com> 1.1.9-1
|
||||||
- doc: release notes 1.1.9 (Igor Gnatenko)
|
- doc: release notes 1.1.9 (Igor Gnatenko)
|
||||||
- spec: correctly set up requirements for python subpkg (Igor Gnatenko)
|
- spec: correctly set up requirements for python subpkg (Igor Gnatenko)
|
||||||
|
51
enforce-api-add-compatibility-methods-for-renamed-co.patch
Normal file
51
enforce-api-add-compatibility-methods-for-renamed-co.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
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
|
||||||
|
|
28
enforce-api-reflect-changes-from-992475-in-completio.patch
Normal file
28
enforce-api-reflect-changes-from-992475-in-completio.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user