ostbuild: Change to name-prefix and base-prefix in manifest

This makes it clearer that we're using this as a prefix, when we
generate the snapshots.
This commit is contained in:
Colin Walters committed 2012-03-13 10:39:26 -04:00
1 parent 76f7bf2060
commit 07e93bd326
5 files changed
+11 -10

No files matched your search

-3
View File
@@ -83,9 +83,6 @@ def manifest_target(manifest):
return name[:-len('-runtime')] + '-devel'
return name
def manifest_base(manifest):
return 'bases/%s' % (manifest['base'],)
def manifest_buildname(manifest, component):
return 'artifacts/%s/%s/%s' % (manifest_target(manifest),
component['name'],
+1 -1
View File
@@ -188,7 +188,7 @@ class OstbuildBuild(builtins.Builtin):
return True
def _compose(self, components):
base_ref = 'bases/%s' % (self.manifest['base'], )
base_ref = self.manifest['base']
# HACK
manifest_build_name = self.manifest['name']
@@ -34,7 +34,7 @@ class OstbuildChrootCompileOne(builtins.Builtin):
index = components.index(component)
dependencies = components[:index]
base = 'bases/%s' % (self.manifest['base'], )
base = self.manifest['base']
checkout_trees = [(base, '/')]
for dep in dependencies:
buildname = buildutil.manifest_buildname(self.manifest, dep)
+7 -3
View File
@@ -234,9 +234,13 @@ class OstbuildResolve(builtins.Builtin):
else:
snapshot['components'] = devel_components
snapshot['name'] = '%s-%s-%s' % (arch_manifest['name'], architecture, component_type)
snapshot_base = snapshot['base']
snapshot['base'] = snapshot_base + '-%s-%s' % (architecture, component_type)
name_prefix = snapshot['name-prefix']
del snapshot['name-prefix']
base_prefix = snapshot['base-prefix']
del snapshot['base-prefix']
snapshot['name'] = '%s-%s-%s' % (name_prefix, architecture, component_type)
snapshot['base'] = '%s-%s-%s' % (base_prefix, architecture, component_type)
out_snapshot = os.path.join(self.workdir, snapshot['name'] + '.snapshot')
f = open(out_snapshot, 'w')
json.dump(snapshot, f, indent=4, sort_keys=True)