Skip to content

Commit

Permalink
Report excludes for every command just before run (RhBug:1656726)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mracek committed Dec 11, 2018
1 parent 325e1f7 commit a62f22f
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions dnf/cli/cli.py
Expand Up @@ -158,21 +158,6 @@ def do_transaction(self, display=()):
:return: history database transaction ID or None
"""

# Reports about excludes and includes (but not from plugins)
if self.conf.excludepkgs:
logger.debug(_('Excludes in dnf.conf: ') +
", ".join(sorted(set(self.conf.excludepkgs))))
if self.conf.includepkgs:
logger.debug(_('Includes in dnf.conf: ') +
", ".join(sorted(set(self.conf.includepkgs))))
for repo in self.repos.iter_enabled():
if repo.excludepkgs:
logger.debug(_('Excludes in repo ') + repo.id + ": " +
", ".join(sorted(set(repo.excludepkgs))))
if repo.includepkgs:
logger.debug(_('Includes in repo ') + repo.id + ": " +
", ".join(sorted(set(repo.includepkgs))))

trans = self.transaction
pkg_str = self.output.list_transaction(trans)
if pkg_str:
Expand Down Expand Up @@ -1104,4 +1089,20 @@ def run(self):
2 = we've got work yet to do, onto the next stage
"""
self._process_demands()

# Reports about excludes and includes (but not from plugins)
if self.base.conf.excludepkgs:
logger.debug(_('Excludes in dnf.conf: ') +
", ".join(sorted(set(self.base.conf.excludepkgs))))
if self.base.conf.includepkgs:
logger.debug(_('Includes in dnf.conf: ') +
", ".join(sorted(set(self.base.conf.includepkgs))))
for repo in self.base.repos.iter_enabled():
if repo.excludepkgs:
logger.debug(_('Excludes in repo ') + repo.id + ": " +
", ".join(sorted(set(repo.excludepkgs))))
if repo.includepkgs:
logger.debug(_('Includes in repo ') + repo.id + ": " +
", ".join(sorted(set(repo.includepkgs))))

return self.command.run()

0 comments on commit a62f22f

Please sign in to comment.