import dnf-4.2.23-2.el8
This commit is contained in:
parent
f55304c8eb
commit
09b2f21043
@ -1 +1 @@
|
||||
535f46b9a5242a315e1269a59372362013a5a6f0 SOURCES/dnf-4.2.17.tar.gz
|
||||
0da07a3e6ff19430ffe39699e474439eab63ee7d SOURCES/dnf-4.2.23.tar.gz
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/dnf-4.2.17.tar.gz
|
||||
SOURCES/dnf-4.2.23.tar.gz
|
||||
|
@ -1,101 +0,0 @@
|
||||
From 8bcd196fd95e70fd1f0be16d2c274e39a1cabe2e Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Rohel <jrohel@redhat.com>
|
||||
Date: Thu, 21 Nov 2019 11:45:03 +0100
|
||||
Subject: [PATCH] Do a substitution of variables in repo_id (RhBug:1748841)
|
||||
|
||||
Example of repo file:
|
||||
[test-$basearch-$releasever]
|
||||
Name=Test-$basearch-$releasever
|
||||
baseurl=file:///mnt/
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1748841
|
||||
---
|
||||
dnf/conf/read.py | 40 +++++++++++++++++++++++++++-------------
|
||||
1 file changed, 27 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dnf/conf/read.py b/dnf/conf/read.py
|
||||
index a526a71..1efac22 100644
|
||||
--- a/dnf/conf/read.py
|
||||
+++ b/dnf/conf/read.py
|
||||
@@ -43,7 +43,7 @@ class RepoReader(object):
|
||||
|
||||
# read .repo files from directories specified by conf.reposdir
|
||||
for repofn in (repofn for reposdir in self.conf.reposdir
|
||||
- for repofn in sorted(glob.glob('%s/*.repo' % reposdir))):
|
||||
+ for repofn in sorted(glob.glob('{}/*.repo'.format(reposdir)))):
|
||||
try:
|
||||
for r in self._get_repos(repofn):
|
||||
yield r
|
||||
@@ -54,17 +54,38 @@ class RepoReader(object):
|
||||
def _build_repo(self, parser, id_, repofn):
|
||||
"""Build a repository using the parsed data."""
|
||||
|
||||
- repo = dnf.repo.Repo(id_, self.conf)
|
||||
+ substituted_id = libdnf.conf.ConfigParser.substitute(id_, self.conf.substitutions)
|
||||
+
|
||||
+ # Check the repo.id against the valid chars
|
||||
+ invalid = dnf.repo.repo_id_invalid(substituted_id)
|
||||
+ if invalid is not None:
|
||||
+ if substituted_id != id_:
|
||||
+ msg = _("Bad id for repo: {} ({}), byte = {} {}").format(substituted_id, id_,
|
||||
+ substituted_id[invalid],
|
||||
+ invalid)
|
||||
+ else:
|
||||
+ msg = _("Bad id for repo: {}, byte = {} {}").format(id_, id_[invalid], invalid)
|
||||
+ raise dnf.exceptions.ConfigError(msg)
|
||||
+
|
||||
+ repo = dnf.repo.Repo(substituted_id, self.conf)
|
||||
try:
|
||||
repo._populate(parser, id_, repofn, dnf.conf.PRIO_REPOCONFIG)
|
||||
except ValueError as e:
|
||||
- msg = _("Repository '%s': Error parsing config: %s") % (id_, e)
|
||||
+ if substituted_id != id_:
|
||||
+ msg = _("Repository '{}' ({}): Error parsing config: {}").format(substituted_id,
|
||||
+ id_, e)
|
||||
+ else:
|
||||
+ msg = _("Repository '{}': Error parsing config: {}").format(id_, e)
|
||||
raise dnf.exceptions.ConfigError(msg)
|
||||
|
||||
# Ensure that the repo name is set
|
||||
if repo._get_priority('name') == dnf.conf.PRIO_DEFAULT:
|
||||
- msg = _("Repository '%s' is missing name in configuration, using id.")
|
||||
- logger.warning(msg, id_)
|
||||
+ if substituted_id != id_:
|
||||
+ msg = _("Repository '{}' ({}) is missing name in configuration, using id.").format(
|
||||
+ substituted_id, id_)
|
||||
+ else:
|
||||
+ msg = _("Repository '{}' is missing name in configuration, using id.").format(id_)
|
||||
+ logger.warning(msg)
|
||||
repo.name = ucd(repo.name)
|
||||
repo._substitutions.update(self.conf.substitutions)
|
||||
repo.cfg = parser
|
||||
@@ -80,23 +101,16 @@ class RepoReader(object):
|
||||
try:
|
||||
parser.read(repofn)
|
||||
except RuntimeError as e:
|
||||
- raise dnf.exceptions.ConfigError(_('Parsing file "%s" failed: %s') % (repofn, e))
|
||||
+ raise dnf.exceptions.ConfigError(_('Parsing file "{}" failed: {}').format(repofn, e))
|
||||
except IOError as e:
|
||||
logger.warning(e)
|
||||
|
||||
# Check sections in the .repo file that was just slurped up
|
||||
for section in parser.getData():
|
||||
|
||||
if section == 'main':
|
||||
continue
|
||||
|
||||
- # Check the repo.id against the valid chars
|
||||
- invalid = dnf.repo.repo_id_invalid(section)
|
||||
- if invalid is not None:
|
||||
- logger.warning(_("Bad id for repo: %s, byte = %s %d"), section,
|
||||
- section[invalid], invalid)
|
||||
- continue
|
||||
-
|
||||
try:
|
||||
thisrepo = self._build_repo(parser, ucd(section), repofn)
|
||||
except (dnf.exceptions.RepoError, dnf.exceptions.ConfigError) as e:
|
||||
--
|
||||
libgit2 0.28.2
|
||||
|
238
SOURCES/0001-Handle-empty-comps-group-name-RhBug1826198.patch
Normal file
238
SOURCES/0001-Handle-empty-comps-group-name-RhBug1826198.patch
Normal file
@ -0,0 +1,238 @@
|
||||
From 3c758a4ea670fab1f4b55fa878ebf2b2ff4b678b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= <lhrazky@redhat.com>
|
||||
Date: Tue, 28 Apr 2020 09:08:05 +0200
|
||||
Subject: [PATCH] Handle empty comps group name (RhBug:1826198)
|
||||
|
||||
Don't crash on empty comps group/environment name. In outputs, use the
|
||||
"<name-unset>" placeholder instead of the name.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1826198
|
||||
---
|
||||
dnf/cli/commands/group.py | 4 ++--
|
||||
dnf/cli/output.py | 16 ++++++++++------
|
||||
dnf/comps.py | 11 ++++++++++-
|
||||
dnf/db/group.py | 12 ++++++++----
|
||||
tests/repos/main_comps.xml | 7 +++++++
|
||||
tests/support.py | 2 +-
|
||||
tests/test_comps.py | 6 +++---
|
||||
tests/test_groups.py | 9 +++++++++
|
||||
8 files changed, 50 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dnf/cli/commands/group.py b/dnf/cli/commands/group.py
|
||||
index f535a50980..4ffd3b89c8 100644
|
||||
--- a/dnf/cli/commands/group.py
|
||||
+++ b/dnf/cli/commands/group.py
|
||||
@@ -177,7 +177,7 @@ def _list(self, userlist):
|
||||
def _out_grp(sect, group):
|
||||
if not done:
|
||||
print(sect)
|
||||
- msg = ' %s' % group.ui_name
|
||||
+ msg = ' %s' % (group.ui_name if group.ui_name is not None else _("<name-unset>"))
|
||||
if print_ids:
|
||||
msg += ' (%s)' % group.id
|
||||
if group.lang_only:
|
||||
@@ -188,7 +188,7 @@ def _out_env(sect, envs):
|
||||
if envs:
|
||||
print(sect)
|
||||
for e in envs:
|
||||
- msg = ' %s' % e.ui_name
|
||||
+ msg = ' %s' % (e.ui_name if e.ui_name is not None else _("<name-unset>"))
|
||||
if print_ids:
|
||||
msg += ' (%s)' % e.id
|
||||
print(msg)
|
||||
diff --git a/dnf/cli/output.py b/dnf/cli/output.py
|
||||
index 67eab80b19..2585a5c773 100644
|
||||
--- a/dnf/cli/output.py
|
||||
+++ b/dnf/cli/output.py
|
||||
@@ -1221,47 +1221,51 @@ def _add_line(lines, data, a_wid, po, obsoletes=[]):
|
||||
lines.append((name, "", "", "", "", "", ""))
|
||||
pkglist_lines.append((action, lines))
|
||||
if self.base._history:
|
||||
+ def format_line(group):
|
||||
+ name = group.getName()
|
||||
+ return (name if name else _("<name-unset>"), "", "", "", "", "", "")
|
||||
+
|
||||
install_env_group = self.base._history.env._installed
|
||||
if install_env_group:
|
||||
action = _("Installing Environment Groups")
|
||||
lines = []
|
||||
for group in install_env_group.values():
|
||||
- lines.append((group.getName(), "", "", "", "", "", ""))
|
||||
+ lines.append(format_line(group))
|
||||
pkglist_lines.append((action, lines))
|
||||
upgrade_env_group = self.base._history.env._upgraded
|
||||
if upgrade_env_group:
|
||||
action = _("Upgrading Environment Groups")
|
||||
lines = []
|
||||
for group in upgrade_env_group.values():
|
||||
- lines.append((group.getName(), "", "", "", "", "", ""))
|
||||
+ lines.append(format_line(group))
|
||||
pkglist_lines.append((action, lines))
|
||||
remove_env_group = self.base._history.env._removed
|
||||
if remove_env_group:
|
||||
action = _("Removing Environment Groups")
|
||||
lines = []
|
||||
for group in remove_env_group.values():
|
||||
- lines.append((group.getName(), "", "", "", "", "", ""))
|
||||
+ lines.append(format_line(group))
|
||||
pkglist_lines.append((action, lines))
|
||||
install_group = self.base._history.group._installed
|
||||
if install_group:
|
||||
action = _("Installing Groups")
|
||||
lines = []
|
||||
for group in install_group.values():
|
||||
- lines.append((group.getName(), "", "", "", "", "", ""))
|
||||
+ lines.append(format_line(group))
|
||||
pkglist_lines.append((action, lines))
|
||||
upgrade_group = self.base._history.group._upgraded
|
||||
if upgrade_group:
|
||||
action = _("Upgrading Groups")
|
||||
lines = []
|
||||
for group in upgrade_group.values():
|
||||
- lines.append((group.getName(), "", "", "", "", "", ""))
|
||||
+ lines.append(format_line(group))
|
||||
pkglist_lines.append((action, lines))
|
||||
remove_group = self.base._history.group._removed
|
||||
if remove_group:
|
||||
action = _("Removing Groups")
|
||||
lines = []
|
||||
for group in remove_group.values():
|
||||
- lines.append((group.getName(), "", "", "", "", "", ""))
|
||||
+ lines.append(format_line(group))
|
||||
pkglist_lines.append((action, lines))
|
||||
# show skipped conflicting packages
|
||||
if not self.conf.best and self.base._goal.actions & forward_actions:
|
||||
diff --git a/dnf/comps.py b/dnf/comps.py
|
||||
index 316d647087..4ca15b1e07 100644
|
||||
--- a/dnf/comps.py
|
||||
+++ b/dnf/comps.py
|
||||
@@ -75,7 +75,16 @@ def _by_pattern(pattern, case_sensitive, sqn):
|
||||
else:
|
||||
match = re.compile(fnmatch.translate(pattern), flags=re.I).match
|
||||
|
||||
- return {g for g in sqn if match(g.name) or match(g.id) or match(g.ui_name)}
|
||||
+ ret = set()
|
||||
+ for g in sqn:
|
||||
+ if match(g.id):
|
||||
+ ret.add(g)
|
||||
+ elif g.name is not None and match(g.name):
|
||||
+ ret.add(g)
|
||||
+ elif g.ui_name is not None and match(g.ui_name):
|
||||
+ ret.add(g)
|
||||
+
|
||||
+ return ret
|
||||
|
||||
|
||||
def _fn_display_order(group):
|
||||
diff --git a/dnf/db/group.py b/dnf/db/group.py
|
||||
index e3a087760b..5d7e18d1a8 100644
|
||||
--- a/dnf/db/group.py
|
||||
+++ b/dnf/db/group.py
|
||||
@@ -78,8 +78,10 @@ def _get_obj_id(self, obj):
|
||||
def new(self, obj_id, name, translated_name, pkg_types):
|
||||
swdb_group = self.history.swdb.createCompsGroupItem()
|
||||
swdb_group.setGroupId(obj_id)
|
||||
- swdb_group.setName(name)
|
||||
- swdb_group.setTranslatedName(translated_name)
|
||||
+ if name is not None:
|
||||
+ swdb_group.setName(name)
|
||||
+ if translated_name is not None:
|
||||
+ swdb_group.setTranslatedName(translated_name)
|
||||
swdb_group.setPackageTypes(pkg_types)
|
||||
return swdb_group
|
||||
|
||||
@@ -136,8 +138,10 @@ def _get_obj_id(self, obj):
|
||||
def new(self, obj_id, name, translated_name, pkg_types):
|
||||
swdb_env = self.history.swdb.createCompsEnvironmentItem()
|
||||
swdb_env.setEnvironmentId(obj_id)
|
||||
- swdb_env.setName(name)
|
||||
- swdb_env.setTranslatedName(translated_name)
|
||||
+ if name is not None:
|
||||
+ swdb_env.setName(name)
|
||||
+ if translated_name is not None:
|
||||
+ swdb_env.setTranslatedName(translated_name)
|
||||
swdb_env.setPackageTypes(pkg_types)
|
||||
return swdb_env
|
||||
|
||||
diff --git a/tests/repos/main_comps.xml b/tests/repos/main_comps.xml
|
||||
index 9e694d13a5..584bb25b3a 100644
|
||||
--- a/tests/repos/main_comps.xml
|
||||
+++ b/tests/repos/main_comps.xml
|
||||
@@ -49,6 +49,13 @@
|
||||
<packagereq type="optional">brokendeps</packagereq>
|
||||
</packagelist>
|
||||
</group>
|
||||
+ <group>
|
||||
+ <id>missing-name-group</id>
|
||||
+ <name></name>
|
||||
+ <packagelist>
|
||||
+ <packagereq type="mandatory">meaning-of-life</packagereq>
|
||||
+ </packagelist>
|
||||
+ </group>
|
||||
<category>
|
||||
<id>base-system</id>
|
||||
<display_order>99</display_order>
|
||||
diff --git a/tests/support.py b/tests/support.py
|
||||
index e549ba5b95..a7d6a8542c 100644
|
||||
--- a/tests/support.py
|
||||
+++ b/tests/support.py
|
||||
@@ -94,7 +94,7 @@ def mock_open(mock=None, data=None):
|
||||
MAIN_NSOLVABLES = 9
|
||||
UPDATES_NSOLVABLES = 4
|
||||
AVAILABLE_NSOLVABLES = MAIN_NSOLVABLES + UPDATES_NSOLVABLES
|
||||
-TOTAL_GROUPS = 4
|
||||
+TOTAL_GROUPS = 5
|
||||
TOTAL_NSOLVABLES = SYSTEM_NSOLVABLES + AVAILABLE_NSOLVABLES
|
||||
|
||||
|
||||
diff --git a/tests/test_comps.py b/tests/test_comps.py
|
||||
index 30d468e3af..763218587f 100644
|
||||
--- a/tests/test_comps.py
|
||||
+++ b/tests/test_comps.py
|
||||
@@ -107,7 +107,7 @@ def test_group_packages(self):
|
||||
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", "Broken Group", None])
|
||||
self.assertEqual([c.name for c in comps.categories_iter()],
|
||||
['Base System'])
|
||||
g = dnf.util.first(comps.groups_iter())
|
||||
@@ -115,7 +115,7 @@ def test_iteration(self):
|
||||
|
||||
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', 'Broken Group', None])
|
||||
|
||||
def test_packages(self):
|
||||
comps = self.comps
|
||||
@@ -127,7 +127,7 @@ def test_packages(self):
|
||||
|
||||
def test_size(self):
|
||||
comps = self.comps
|
||||
- self.assertLength(comps, 6)
|
||||
+ self.assertLength(comps, 7)
|
||||
self.assertLength(comps.groups, tests.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 fe388f96c0..8972da687e 100644
|
||||
--- a/tests/test_groups.py
|
||||
+++ b/tests/test_groups.py
|
||||
@@ -295,6 +295,15 @@ def test_group_install_broken_optional_nonstrict(self):
|
||||
self.assertLength(inst, 1)
|
||||
self.assertEmpty(removed)
|
||||
|
||||
+ def test_group_install_missing_name(self):
|
||||
+ comps_group = self.base.comps.group_by_pattern('missing-name-group')
|
||||
+
|
||||
+ cnt = self.base.group_install(comps_group.id, ('mandatory', 'default', 'optional'),
|
||||
+ strict=False)
|
||||
+ self._swdb_commit()
|
||||
+ self.base.resolve()
|
||||
+ self.assertEqual(cnt, 1)
|
||||
+
|
||||
|
||||
class EnvironmentInstallTest(tests.support.ResultTestCase):
|
||||
"""Set up a test where sugar is considered not installed."""
|
@ -1,67 +0,0 @@
|
||||
From ba3615c600532a0ce8693a626a9cbe71a458399a Mon Sep 17 00:00:00 2001
|
||||
From: Pavla Kratochvilova <pkratoch@redhat.com>
|
||||
Date: Thu, 23 May 2019 14:48:29 +0200
|
||||
Subject: [PATCH 1/2] Respect order of config files in aliases.d
|
||||
(RhBug:1680489)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1680489
|
||||
The aliases config files were read in arbitrary order (os.listdir does not
|
||||
give sorted output). It is better to define clear order (i.e. all config files
|
||||
except USER.conf are ordered alphabetically, USER.conf is the last).
|
||||
|
||||
Closes: #1542
|
||||
Approved by: kontura
|
||||
---
|
||||
dnf/cli/aliases.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dnf/cli/aliases.py b/dnf/cli/aliases.py
|
||||
index 0b3ba8f6b..b5283d0f3 100644
|
||||
--- a/dnf/cli/aliases.py
|
||||
+++ b/dnf/cli/aliases.py
|
||||
@@ -143,7 +143,7 @@ class Aliases(object):
|
||||
try:
|
||||
if not os.path.exists(ALIASES_DROPIN_DIR):
|
||||
os.mkdir(ALIASES_DROPIN_DIR)
|
||||
- for fn in os.listdir(ALIASES_DROPIN_DIR):
|
||||
+ for fn in sorted(os.listdir(ALIASES_DROPIN_DIR)):
|
||||
if _ignore_filename(fn):
|
||||
continue
|
||||
filenames.append(os.path.join(ALIASES_DROPIN_DIR, fn))
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From e292de84fcdec844530099a6c37ef29e1a330003 Mon Sep 17 00:00:00 2001
|
||||
From: Pavla Kratochvilova <pkratoch@redhat.com>
|
||||
Date: Thu, 23 May 2019 15:04:34 +0200
|
||||
Subject: [PATCH 2/2] [doc] Describe priorities of config files in aliases.d
|
||||
(RhBug:1680489)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1680489
|
||||
|
||||
Closes: #1542
|
||||
Approved by: kontura
|
||||
---
|
||||
doc/command_ref.rst | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/doc/command_ref.rst b/doc/command_ref.rst
|
||||
index 7141fc2aa..637ccf96b 100644
|
||||
--- a/doc/command_ref.rst
|
||||
+++ b/doc/command_ref.rst
|
||||
@@ -424,7 +424,10 @@ for aliases. The alias processing stops when the first found command is not a na
|
||||
Also, like in shell aliases, if the result starts with a ``\``, the alias processing will stop.
|
||||
|
||||
All aliases are defined in configuration files in the ``/etc/dnf/aliases.d/`` directory in the [aliases] section,
|
||||
-and aliases created by the alias command are written to the ``USER.conf`` file.
|
||||
+and aliases created by the alias command are written to the ``USER.conf`` file. In case of conflicts,
|
||||
+the ``USER.conf`` has the highest priority, and alphabetical ordering is used for the rest of the
|
||||
+configuration files.
|
||||
+
|
||||
Optionally, there is the ``enabled`` option in the ``[main]`` section defaulting to True. This can be set for each
|
||||
file separately in the respective file, or globally for all aliases in the ``ALIASES.conf`` file.
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 3c473306e5e1b630a3030791fb1ef7ea0c0cd823 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Domonkos <mdomonko@redhat.com>
|
||||
Date: Tue, 26 Nov 2019 13:22:15 +0100
|
||||
Subject: [PATCH] [doc] Remove note about whitelist
|
||||
|
||||
The whitelist mechanism has been recently removed from libdnf.
|
||||
|
||||
Closes: #1543
|
||||
Approved by: Conan-Kudo
|
||||
---
|
||||
doc/conf_ref.rst | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/doc/conf_ref.rst b/doc/conf_ref.rst
|
||||
index d3ea11d..cb95e47 100644
|
||||
--- a/doc/conf_ref.rst
|
||||
+++ b/doc/conf_ref.rst
|
||||
@@ -806,11 +806,6 @@ configuration.
|
||||
|
||||
libdnf (Fedora 31; server; Linux.x86_64)
|
||||
|
||||
- To avoid leaking identifiable data, the variant in the above string will be
|
||||
- replaced by "generic" if the value is not an official Fedora variant.
|
||||
- Likewise, the whole OS part (enclosed in parenthesis) will be omitted if
|
||||
- this is a non-Fedora system.
|
||||
-
|
||||
=================
|
||||
Types of Options
|
||||
=================
|
||||
--
|
||||
libgit2 0.28.2
|
||||
|
@ -1,157 +0,0 @@
|
||||
From c8d79c0b9956aeeb8cd3a0422656b030d4656578 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Mon, 9 Dec 2019 12:32:18 +0100
|
||||
Subject: [PATCH 1/2] Fix detection of the latest module (RhBug:1781769)
|
||||
|
||||
The code originally compared module version as a string, but it should
|
||||
be compared as a int.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1781769
|
||||
|
||||
Closes: #1548
|
||||
Approved by: m-blaha
|
||||
---
|
||||
dnf/module/module_base.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dnf/module/module_base.py b/dnf/module/module_base.py
|
||||
index 8093ab443..64bad84b6 100644
|
||||
--- a/dnf/module/module_base.py
|
||||
+++ b/dnf/module/module_base.py
|
||||
@@ -285,7 +285,7 @@ class ModuleBase(object):
|
||||
if module_list:
|
||||
latest = module_list[0]
|
||||
for module in module_list[1:]:
|
||||
- if module.getVersion() > latest.getVersion():
|
||||
+ if module.getVersionNum() > latest.getVersionNum():
|
||||
latest = module
|
||||
return latest
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 44e9095404569dbf8a19726eb79be8e580bed60c Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Mracek <jmracek@redhat.com>
|
||||
Date: Wed, 11 Dec 2019 09:52:16 +0100
|
||||
Subject: [PATCH 2/2] Improve transaction table formatting
|
||||
|
||||
It improves formatting of transaction table in case when terminal has
|
||||
unknown width.
|
||||
|
||||
Closes: #1548
|
||||
Approved by: m-blaha
|
||||
---
|
||||
dnf/cli/output.py | 45 ++++++++++++++++++++++++---------------------
|
||||
1 file changed, 24 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dnf/cli/output.py b/dnf/cli/output.py
|
||||
index a03df610c..2ff41b625 100644
|
||||
--- a/dnf/cli/output.py
|
||||
+++ b/dnf/cli/output.py
|
||||
@@ -224,16 +224,32 @@ class Output(object):
|
||||
if total_width is None:
|
||||
total_width = self.term.real_columns
|
||||
|
||||
+ # We start allocating 1 char to everything but the last column, and a
|
||||
+ # space between each (again, except for the last column). Because
|
||||
+ # at worst we are better with:
|
||||
+ # |one two three|
|
||||
+ # | four |
|
||||
+ # ...than:
|
||||
+ # |one two three|
|
||||
+ # | f|
|
||||
+ # |our |
|
||||
+ # ...the later being what we get if we pre-allocate the last column, and
|
||||
+ # thus. the space, due to "three" overflowing it's column by 2 chars.
|
||||
+ if columns is None:
|
||||
+ columns = [1] * (cols - 1)
|
||||
+ columns.append(0)
|
||||
+
|
||||
# i'm not able to get real terminal width so i'm probably
|
||||
# running in non interactive terminal (pipe to grep, redirect to file...)
|
||||
# avoid splitting lines to enable filtering output
|
||||
if not total_width:
|
||||
full_columns = []
|
||||
- for col in data:
|
||||
+ for d in xrange(0, cols):
|
||||
+ col = data[d]
|
||||
if col:
|
||||
full_columns.append(col[-1][0])
|
||||
else:
|
||||
- full_columns.append(0)
|
||||
+ full_columns.append(columns[d] + 1)
|
||||
full_columns[0] += len(indent)
|
||||
# if possible, try to keep default width (usually 80 columns)
|
||||
default_width = self.term.columns
|
||||
@@ -241,20 +257,6 @@ class Output(object):
|
||||
return full_columns
|
||||
total_width = default_width
|
||||
|
||||
- # We start allocating 1 char to everything but the last column, and a
|
||||
- # space between each (again, except for the last column). Because
|
||||
- # at worst we are better with:
|
||||
- # |one two three|
|
||||
- # | four |
|
||||
- # ...than:
|
||||
- # |one two three|
|
||||
- # | f|
|
||||
- # |our |
|
||||
- # ...the later being what we get if we pre-allocate the last column, and
|
||||
- # thus. the space, due to "three" overflowing it's column by 2 chars.
|
||||
- if columns is None:
|
||||
- columns = [1] * (cols - 1)
|
||||
- columns.append(0)
|
||||
|
||||
total_width -= (sum(columns) + (cols - 1) + exact_width(indent))
|
||||
if not columns[-1]:
|
||||
@@ -1273,7 +1275,7 @@ class Output(object):
|
||||
skip_str = skip_str % _(" or part of a group")
|
||||
|
||||
pkglist_lines.append((skip_str, lines))
|
||||
-
|
||||
+ output_width = self.term.columns
|
||||
if not data['n'] and not self.base._moduleContainer.isChanged() and not \
|
||||
(self.base._history and (self.base._history.group or self.base._history.env)):
|
||||
return u''
|
||||
@@ -1283,6 +1285,8 @@ class Output(object):
|
||||
columns = self.calcColumns(data, indent=" ", columns=columns,
|
||||
remainder_column=2, total_width=total_width)
|
||||
(n_wid, a_wid, v_wid, r_wid, s_wid) = columns
|
||||
+ real_width = sum(columns) + 5
|
||||
+ output_width = output_width if output_width >= real_width else real_width
|
||||
|
||||
# Do not use 'Package' without context. Using context resolves
|
||||
# RhBug 1302935 as a side effect.
|
||||
@@ -1325,13 +1329,13 @@ class Output(object):
|
||||
# Translators: This is the full (unabbreviated) term 'Size'.
|
||||
C_('long', 'Size'))
|
||||
|
||||
- out = [u"%s\n%s\n%s\n" % ('=' * self.term.columns,
|
||||
+ out = [u"%s\n%s\n%s\n" % ('=' * output_width,
|
||||
self.fmtColumns(((msg_package, -n_wid),
|
||||
(msg_arch, -a_wid),
|
||||
(msg_version, -v_wid),
|
||||
(msg_repository, -r_wid),
|
||||
(msg_size, s_wid)), u" "),
|
||||
- '=' * self.term.columns)]
|
||||
+ '=' * output_width)]
|
||||
|
||||
for (action, lines) in pkglist_lines:
|
||||
if lines:
|
||||
@@ -1349,11 +1353,10 @@ class Output(object):
|
||||
|
||||
if lines:
|
||||
out.append(totalmsg)
|
||||
-
|
||||
out.append(_("""
|
||||
Transaction Summary
|
||||
%s
|
||||
-""") % ('=' * self.term.columns))
|
||||
+""") % ('=' * output_width))
|
||||
summary_data = (
|
||||
(_('Install'), len(list_bunch.installed) +
|
||||
len(list_bunch.installed_group) +
|
||||
--
|
||||
2.21.0
|
||||
|
109
SPECS/dnf.spec
109
SPECS/dnf.spec
@ -1,11 +1,11 @@
|
||||
# default dependencies
|
||||
%global hawkey_version 0.39.1
|
||||
%global hawkey_version 0.48.0
|
||||
%global libcomps_version 0.1.8
|
||||
%global libmodulemd_version 1.4.0
|
||||
%global rpm_version 4.14.0
|
||||
%global rpm_version 4.14.2-35
|
||||
|
||||
# conflicts
|
||||
%global conflicts_dnf_plugins_core_version 4.0.12
|
||||
%global conflicts_dnf_plugins_core_version 4.0.16
|
||||
%global conflicts_dnf_plugins_extras_version 4.0.4
|
||||
%global conflicts_dnfdaemon_version 0.3.19
|
||||
|
||||
@ -81,17 +81,14 @@
|
||||
It supports RPMs, modules and comps groups & environments.
|
||||
|
||||
Name: dnf
|
||||
Version: 4.2.17
|
||||
Release: 3%{?dist}
|
||||
Version: 4.2.23
|
||||
Release: 2%{?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
|
||||
Patch1: 0001-Do-a-substitution-of-variables-in-repo_id-RhBug1748841.patch
|
||||
Patch2: 0002-Fix-and-document-order-of-config-files-in-aliasesd-RhBug1680489.patch
|
||||
Patch3: 0003-doc-Remove-note-about-whitelist.patch
|
||||
Patch4: 0004-Fix-detection-of-the-latest-module-RhBug1781769.patch
|
||||
Patch1: 0001-Handle-empty-comps-group-name-RhBug1826198.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: cmake
|
||||
@ -142,8 +139,8 @@ Provides: dnf-command(upgrade)
|
||||
Provides: dnf-command(upgrade-to)
|
||||
Conflicts: python2-dnf-plugins-core < %{conflicts_dnf_plugins_core_version}
|
||||
Conflicts: python3-dnf-plugins-core < %{conflicts_dnf_plugins_core_version}
|
||||
Conflicts: python2-dnf-plugins-extras < %{conflicts_dnf_plugins_extras_version}
|
||||
Conflicts: python3-dnf-plugins-extras < %{conflicts_dnf_plugins_extras_version}
|
||||
Conflicts: python2-dnf-plugins-extras-common < %{conflicts_dnf_plugins_extras_version}
|
||||
Conflicts: python3-dnf-plugins-extras-common < %{conflicts_dnf_plugins_extras_version}
|
||||
|
||||
%description
|
||||
%{pkg_description}
|
||||
@ -198,11 +195,9 @@ Requires: python2-enum34
|
||||
Requires: %{name}-data = %{version}-%{release}
|
||||
%if 0%{?fedora}
|
||||
Recommends: deltarpm
|
||||
# required for DNSSEC main.gpgkey_dns_verification https://dnf.readthedocs.io/en/latest/conf_ref.html
|
||||
Recommends: python2-unbound
|
||||
%endif
|
||||
%if 0%{?centos}
|
||||
Requires: deltarpm
|
||||
%endif
|
||||
Requires: python2-hawkey >= %{hawkey_version}
|
||||
Requires: python2-libdnf >= %{hawkey_version}
|
||||
Requires: python2-libcomps >= %{libcomps_version}
|
||||
@ -240,15 +235,13 @@ Requires: %{name}-data = %{version}-%{release}
|
||||
%if 0%{?fedora}
|
||||
Recommends: deltarpm
|
||||
%endif
|
||||
%if 0%{?centos}
|
||||
Requires: deltarpm
|
||||
%endif
|
||||
Requires: python3-hawkey >= %{hawkey_version}
|
||||
Requires: python3-libdnf >= %{hawkey_version}
|
||||
Requires: python3-libcomps >= %{libcomps_version}
|
||||
Requires: python3-libdnf
|
||||
BuildRequires: python3-rpm >= %{rpm_version}
|
||||
Requires: python3-rpm >= %{rpm_version}
|
||||
# required for DNSSEC main.gpgkey_dns_verification https://dnf.readthedocs.io/en/latest/conf_ref.html
|
||||
Recommends: python3-unbound
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
Requires: rpm-plugin-systemd-inhibit
|
||||
@ -279,7 +272,7 @@ mkdir build-py3
|
||||
%build
|
||||
%if %{with python2}
|
||||
pushd build-py2
|
||||
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python2}
|
||||
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python2} -DDNF_VERSION=%{version}
|
||||
%make_build
|
||||
make doc-man
|
||||
popd
|
||||
@ -287,7 +280,7 @@ mkdir build-py3
|
||||
|
||||
%if %{with python3}
|
||||
pushd build-py3
|
||||
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python3}
|
||||
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python3} -DDNF_VERSION=%{version}
|
||||
%make_build
|
||||
make doc-man
|
||||
popd
|
||||
@ -515,6 +508,84 @@ ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jun 10 2020 Ales Matej <amatej@redhat.com> - 4.2.23-2
|
||||
- Handle empty comps group name (RhBug:1826198)
|
||||
|
||||
* Tue Jun 02 2020 Nicola Sella <nsella@redhat.com> - 4.2.23-1
|
||||
- Update to 4.2.23
|
||||
- Fix behavior of `install-n` command
|
||||
- Fix behavior of `localinstall` command
|
||||
- Fix behavior of `autoremove-n` command
|
||||
- Fix behavior of `remove-n` command
|
||||
- Fix behavior of `repoquery-n` command
|
||||
- Fix behavior of `list-updateinfo` and related aliases
|
||||
- Refactor code in `repoinfo` to use opts.command correctly.
|
||||
- Add myself to list of contributors
|
||||
- Add updated to verbose output of updateinfo list (RhBug: 1801092)
|
||||
- Fix a couple of missed grammatical errors in updateinfo docs.
|
||||
- Add comment option (RhBug:1773679)
|
||||
- Better wording of dnssec email parsing error.
|
||||
- Print nicer DnssecErrors (RhBug:1813244)
|
||||
- Add new API for handling gpg signatures (RhBug:1339617)
|
||||
- Verify GPG signatures (RhBug:1793298)
|
||||
- Fix a syntax typo
|
||||
- Fix up Conflicts: on python-dnf-plugins-extras so it actually works
|
||||
- [doc] Move yum-plugin-post-transaction-actions to dnf-plugins-core
|
||||
- Remove args "--set-enabled", "--set-disabled" from DNF (RhBug:1727882)
|
||||
- Search command is now alphabetical (RhBug:1811802)
|
||||
- Fix downloading packages with full URL as their location
|
||||
- repo: catch libdnf.error.Error in addition to RuntimeError in load() (RhBug:1788182)
|
||||
- History tbl to max size when redirect to file (RhBug:1786335,1786316)
|
||||
|
||||
* Mon Apr 06 2020 Ales Matej <amatej@redhat.com> - 4.2.21-1
|
||||
- Update to 4.2.21
|
||||
- Running with tsflags=test doesn't update log files
|
||||
- Allow disabling individual aliases config files (RhBug:1680566)
|
||||
- List arguments: only first empty value is used (RhBug:1788154)
|
||||
- Report missing profiles or default as broken module (RhBug:1790967)
|
||||
- Format history table to use actual terminal width (RhBug:1786316)
|
||||
- Handle custom exceptions from libdnf
|
||||
- Fix _skipped_packages to return only skipped (RhBug:1774617)
|
||||
- Add setter for tsi.reason
|
||||
- Add new hook for commands: Run_resolved
|
||||
- Clean also .yaml repository metadata
|
||||
- Use WantedBy=timers.target for all dnf timers (RhBug:1798475)
|
||||
- Fix completion helper if solv files not in roon cache (RhBug:1714376)
|
||||
- Add bash completion for 'dnf module' (RhBug:1565614)
|
||||
- Check command no longer reports missing %pre and %post deps (RhBug:1543449)
|
||||
- Check if arguments can be encoded in 'utf-8'
|
||||
- Fix crash with "dnf -d 6 repolist" (RhBug:1812682)
|
||||
- Do not print the first empty line for repoinfo
|
||||
- Redirect logger and repo download progress when --verbose
|
||||
- Respect repo priority when listing packages (RhBug:1800342)
|
||||
- Remove misleading green color from the "broken dependencies" lines (RhBug:1814192)
|
||||
- [repoquery] Fix rich deps matching by using provide expansion from libdnf (RhBug:1534123)
|
||||
- [repoquery] Do not protect running kernel for --unsafisfied (RhBug:1750745)
|
||||
- [doc] Document the retries config option only works for packages (RhBug:1783041)
|
||||
- [doc] repoquery --what* with multiple arguments (RhBug:1790262)
|
||||
- [doc] Remove incorrect information about includepkgs (RhBug:1813460)
|
||||
- [doc] Document that list and info commands respect repo priority
|
||||
- [doc] Document color options
|
||||
|
||||
* Tue Feb 18 2020 Ales Matej <amatej@redhat.com> - 4.2.17-6
|
||||
- Sort packages in transaction output by nevra (RhBug:1773436)
|
||||
- Add support of commandline packages by repoquery (RhBug:1784148)
|
||||
- [doc] Document that the include option was removed (RhBug:1786072)
|
||||
- New API function for setting loggers (RhBug:1788212)
|
||||
|
||||
* Fri Jan 31 2020 Marek Blaha <mblaha@redhat.com> - 4.2.17-5
|
||||
- [translations] Update translations from zanata (RhBug:1754959)
|
||||
|
||||
* Mon Jan 13 2020 Ales Matej <amatej@redhat.com> - 4.2.17-4
|
||||
- Fix alias processing with '\' escaping (RhBug:1680482)
|
||||
- [doc] Explain the backslash notation also near the example (RhBug:1680482)
|
||||
- Better descriptions for infinite aliases recursion (RhBug:1680488)
|
||||
- Improve help for 'dnf module' command (RhBug:1758447)
|
||||
- Unify downgrade exit codes with upgrade (RhBug:1759847)
|
||||
- Honor priority with check-update (RhBug:1769466)
|
||||
- Add shell restriction with local packages (RhBug:1773483)
|
||||
- Restore functionality of remove --oldinstallonly (RhBug:1774670)
|
||||
|
||||
* Thu Dec 12 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 4.2.17-3
|
||||
- Do a substitution of variables in repo_id (RhBug:1748841)
|
||||
- Respect order of config files in aliases.d (RhBug:1680489)
|
||||
|
Loading…
Reference in New Issue
Block a user