ostbuild: Only check out source if we need to
When using --skip-built, we shouldn't do a checkout if we're not going to build.
This commit is contained in:
parent
c3c751ffb5
commit
ee49c8098c
|
|
@ -100,10 +100,6 @@ class OstbuildBuild(builtins.Builtin):
|
||||||
buildname = buildutil.manifest_buildname(self.manifest, meta)
|
buildname = buildutil.manifest_buildname(self.manifest, meta)
|
||||||
buildroot_name = buildutil.manifest_buildroot_name(self.manifest, meta)
|
buildroot_name = buildutil.manifest_buildroot_name(self.manifest, meta)
|
||||||
|
|
||||||
checkoutdir = os.path.join(self.workdir, 'src')
|
|
||||||
component_src = os.path.join(checkoutdir, name)
|
|
||||||
run_sync(['ostbuild', 'checkout', '--overwrite', '--manifest=' + self.manifest_path, name], cwd=checkoutdir)
|
|
||||||
|
|
||||||
current_vcs_version = meta['revision']
|
current_vcs_version = meta['revision']
|
||||||
|
|
||||||
previous_build_version = run_sync_get_output(['ostree', '--repo=' + self.repo,
|
previous_build_version = run_sync_get_output(['ostree', '--repo=' + self.repo,
|
||||||
|
|
@ -132,6 +128,10 @@ class OstbuildBuild(builtins.Builtin):
|
||||||
else:
|
else:
|
||||||
log("No previous build for '%s' found" % (buildname, ))
|
log("No previous build for '%s' found" % (buildname, ))
|
||||||
|
|
||||||
|
checkoutdir = os.path.join(self.workdir, 'src')
|
||||||
|
component_src = os.path.join(checkoutdir, name)
|
||||||
|
run_sync(['ostbuild', 'checkout', '--overwrite', '--manifest=' + self.manifest_path, name], cwd=checkoutdir)
|
||||||
|
|
||||||
artifact_meta = dict(meta)
|
artifact_meta = dict(meta)
|
||||||
|
|
||||||
metadata_path = os.path.join(component_src, '_ostbuild-meta.json')
|
metadata_path = os.path.join(component_src, '_ostbuild-meta.json')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue