module-source: Log details about what packages are gathered
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
48d155d304
commit
2bd3b85bb7
@ -28,6 +28,11 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
|
|||||||
enabled = True
|
enabled = True
|
||||||
|
|
||||||
def __call__(self, arch, variant):
|
def __call__(self, arch, variant):
|
||||||
|
logfile = self.compose.paths.log.log_file(arch, 'source-module-%s' % variant.uid)
|
||||||
|
with open(logfile, 'w') as log:
|
||||||
|
return self.worker(log, arch, variant)
|
||||||
|
|
||||||
|
def worker(self, log, arch, variant):
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
groups = set()
|
groups = set()
|
||||||
@ -46,9 +51,11 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
|
|||||||
for a in compatible_arches
|
for a in compatible_arches
|
||||||
], [])
|
], [])
|
||||||
for rpm_obj in rpms:
|
for rpm_obj in rpms:
|
||||||
|
log.write('Examining %s for inclusion\n' % rpm_obj)
|
||||||
# Skip the RPM if it is excluded on this arch or exclusive
|
# Skip the RPM if it is excluded on this arch or exclusive
|
||||||
# for different arch.
|
# for different arch.
|
||||||
if pungi.arch.is_excluded(rpm_obj, compatible_arches):
|
if pungi.arch.is_excluded(rpm_obj, compatible_arches):
|
||||||
|
log.write('Skipping %s due to incompatible arch\n' % rpm_obj)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for mmd in variant.mmds:
|
for mmd in variant.mmds:
|
||||||
@ -68,6 +75,8 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
|
|||||||
packages.add((rpm_obj, None))
|
packages.add((rpm_obj, None))
|
||||||
added_rpms.setdefault(mmd_id, [])
|
added_rpms.setdefault(mmd_id, [])
|
||||||
added_rpms[mmd_id].append(str(rpm_obj.nevra))
|
added_rpms[mmd_id].append(str(rpm_obj.nevra))
|
||||||
|
log.write('Adding %s because it is in %s\n'
|
||||||
|
% (rpm_obj, mmd_id))
|
||||||
|
|
||||||
# GatherSource returns all the packages in variant and does not
|
# GatherSource returns all the packages in variant and does not
|
||||||
# care which package is in which module, but for modular metadata
|
# care which package is in which module, but for modular metadata
|
||||||
|
Loading…
Reference in New Issue
Block a user