mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-16 10:50:43 +03:00
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:
parent
76f7bf2060
commit
07e93bd326
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "gnomeos-3.4",
|
||||
"name-prefix": "gnomeos-3.4",
|
||||
"architectures": ["i686"],
|
||||
"base": "yocto/gnomeos-3.4",
|
||||
"base-prefix": "bases/yocto/gnomeos-3.4",
|
||||
|
||||
"config-opts": ["--disable-static", "--disable-silent-rules"],
|
||||
|
||||
|
@ -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'],
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user