[ostree] ostbuild: Change to name-prefix and base-prefix in manifest
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] ostbuild: Change to name-prefix and base-prefix in manifest
- Date: Tue, 13 Mar 2012 14:42:06 +0000 (UTC)
commit 07e93bd32652d8993e96af3838e2afdd343ea8c5
Author: Colin Walters <walters verbum org>
Date: Wed Mar 7 12:06:44 2012 -0500
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.
gnomeos/3.4/manifest.json | 4 ++--
src/ostbuild/pyostbuild/buildutil.py | 3 ---
src/ostbuild/pyostbuild/builtin_build.py | 2 +-
.../pyostbuild/builtin_chroot_compile_one.py | 2 +-
src/ostbuild/pyostbuild/builtin_resolve.py | 10 +++++++---
5 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/gnomeos/3.4/manifest.json b/gnomeos/3.4/manifest.json
index 5a4b4ab..4a3e8fb 100644
--- a/gnomeos/3.4/manifest.json
+++ b/gnomeos/3.4/manifest.json
@@ -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"],
diff --git a/src/ostbuild/pyostbuild/buildutil.py b/src/ostbuild/pyostbuild/buildutil.py
index e7cae93..79f0129 100755
--- a/src/ostbuild/pyostbuild/buildutil.py
+++ b/src/ostbuild/pyostbuild/buildutil.py
@@ -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'],
diff --git a/src/ostbuild/pyostbuild/builtin_build.py b/src/ostbuild/pyostbuild/builtin_build.py
index 40f0bfb..7f1ca8d 100755
--- a/src/ostbuild/pyostbuild/builtin_build.py
+++ b/src/ostbuild/pyostbuild/builtin_build.py
@@ -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']
diff --git a/src/ostbuild/pyostbuild/builtin_chroot_compile_one.py b/src/ostbuild/pyostbuild/builtin_chroot_compile_one.py
index f9dc4be..fd0a35f 100755
--- a/src/ostbuild/pyostbuild/builtin_chroot_compile_one.py
+++ b/src/ostbuild/pyostbuild/builtin_chroot_compile_one.py
@@ -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)
diff --git a/src/ostbuild/pyostbuild/builtin_resolve.py b/src/ostbuild/pyostbuild/builtin_resolve.py
index e7f5ece..5018b49 100755
--- a/src/ostbuild/pyostbuild/builtin_resolve.py
+++ b/src/ostbuild/pyostbuild/builtin_resolve.py
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]