buildinstall: Use metadata if skipped

If the phase is skipped, it could mean that we are doing a debug run and
we don't want to mess up the .treefile by missing arch specific images.
The other alternative is that the phase was really skipped, in which
case there will be no files generated and we already handle that fine.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-04-23 08:18:39 +02:00
parent 9915c7d644
commit ea0964eeef
2 changed files with 7 additions and 1 deletions

View File

@ -182,7 +182,11 @@ class BuildinstallPhase(PhaseBase):
self.pool.start()
def succeeded(self, variant, arch):
return (variant.uid if self.used_lorax else None, arch) in self.pool.finished_tasks
# If the phase is skipped, we can treat it as successful. Either there
# will be no output, or it's a debug run of compose where anything can
# happen.
return (super(BuildinstallPhase, self).skip()
or (variant.uid if self.used_lorax else None, arch) in self.pool.finished_tasks)
def copy_files(self):
disc_type = self.compose.conf['disc_types'].get('dvd', 'dvd')

View File

@ -31,6 +31,8 @@ class BuildInstallCompose(DummyCompose):
}
self.all_variants = self.variants.copy()
self.has_comps = True
self.just_phases = []
self.skip_phases = []
class TestBuildinstallPhase(PungiTestCase):