gather: Display source repo of packages

When multiple repos are configured in pkgset_repos, the logs should
contain information on where exactly the package was pulled from. The
log file in question should be in
`logs/<arch>/pkgset_source.<arch>.log`.

Fixes: #545
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-06-07 15:07:07 +02:00
parent c337018294
commit 4fb28979cf

View File

@ -1211,11 +1211,10 @@ class Pungi(PungiBase):
"""Cycle through the list of package objects and
download them from their respective repos."""
downloads = []
for pkg in polist:
downloads.append('%s.%s' % (pkg.name, pkg.arch))
downloads.sort()
self.logger.info("Download list: %s" % downloads)
for pkg in sorted(polist):
repo = self.ayum.repos.getRepo(pkg.repoid)
self.logger.info("Downloading %s.%s from %s",
pkg.name, pkg.arch, repo.baseurl or repo.mirrorlist)
pkgdir = os.path.join(self.config.get('pungi', 'destdir'),
self.config.get('pungi', 'version'),