Skip to content

Commit

Permalink
Do not add installed pkg into available ones (RhBug:1655605)
Browse files Browse the repository at this point in the history
When --showduplicates is used with dnf list, do not add packages from
the reinstall_available list to the list of available packages if the
packages are installed. Those packages are already listed in the
installed list and would show up twice and in incorrect section.

https://bugzilla.redhat.com/show_bug.cgi?id=1655605
https://bugzilla.redhat.com/show_bug.cgi?id=1650275
https://bugzilla.redhat.com/show_bug.cgi?id=1671731
  • Loading branch information
j-mracek authored and lukash committed Mar 8, 2019
1 parent 14b6d4d commit e9992c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dnf/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ def returnPkgLists(self, pkgnarrow='all', patterns=None,
ypl = self._do_package_lists(
pkgnarrow, patterns, ignore_case=True, reponame=reponame)
if self.conf.showdupesfromrepos:
ypl.available += ypl.reinstall_available
for pkg in ypl.reinstall_available:
if not pkg.installed and not done_hidden_available:
ypl.available.append(pkg)

if installed_available:
ypl.hidden_available = ypl.available
Expand Down

0 comments on commit e9992c0

Please sign in to comment.