ostbuild: Rename build manifest to "snapshot.json"
It was confusing having two manifests. "snapshot" matches the jhbuild term for the same thing.
This commit is contained in:
parent
40aedeb7a4
commit
b8e3f622f1
|
|
@ -23,6 +23,8 @@
|
|||
"netfilter": "git:git://git.netfilter.org/",
|
||||
"cgwalters": "git:git://github.com/cgwalters/"},
|
||||
|
||||
"patches": {"src": "gnome:ostree"},
|
||||
|
||||
"components": [
|
||||
{"src": "cgwalters:ginitscripts"},
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ class OstbuildBuild(builtins.Builtin):
|
|||
f.close()
|
||||
|
||||
args = ['ostree', '--repo=' + self.repo,
|
||||
'commit', '-b', buildname, '-s', 'Build ' + artifact_meta['revision'],
|
||||
'commit', '-b', buildname, '-s', 'Build',
|
||||
'--add-metadata-string=ostbuild-buildroot-version=' + artifact_meta['buildroot-version'],
|
||||
'--add-metadata-string=ostbuild-artifact-version=' + artifact_meta['revision'],
|
||||
'--owner-uid=0', '--owner-gid=0', '--no-xattrs',
|
||||
|
|
@ -233,7 +233,7 @@ class OstbuildBuild(builtins.Builtin):
|
|||
self.buildopts.shell_on_failure = args.shell_on_failure
|
||||
self.buildopts.skip_built = args.skip_built
|
||||
|
||||
build_manifest_path = os.path.join(self.workdir, 'manifest.json')
|
||||
build_manifest_path = os.path.join(self.workdir, 'snapshot.json')
|
||||
self.manifest = json.load(open(build_manifest_path))
|
||||
|
||||
self.patchdir = os.path.join(self.workdir, 'patches')
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class OstbuildCheckout(builtins.Builtin):
|
|||
|
||||
self.parse_config()
|
||||
|
||||
build_manifest_path = os.path.join(self.workdir, 'manifest.json')
|
||||
build_manifest_path = os.path.join(self.workdir, 'snapshot.json')
|
||||
self.manifest = json.load(open(build_manifest_path))
|
||||
|
||||
for component_name in args.components:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class OstbuildChrootCompileOne(builtins.Builtin):
|
|||
self.parse_config()
|
||||
|
||||
component_name = os.path.basename(os.getcwd())
|
||||
build_manifest_path = os.path.join(self.workdir, 'manifest.json')
|
||||
build_manifest_path = os.path.join(self.workdir, 'snapshot.json')
|
||||
self.manifest = json.load(open(build_manifest_path))
|
||||
|
||||
if args.meta is not None:
|
||||
|
|
|
|||
|
|
@ -159,6 +159,13 @@ class OstbuildResolve(builtins.Builtin):
|
|||
run_sync(['git', 'fetch'], cwd=mirrordir, log_initiation=False)
|
||||
else:
|
||||
fetch_components = []
|
||||
|
||||
self.manifest['patches'] = self._resolve_component_meta(self.manifest['patches'])
|
||||
patches_meta = self.manifest['patches']
|
||||
(keytype, uri) = self._parse_src_key(patches_meta['src'])
|
||||
mirrordir = self._ensure_vcs_mirror(patches_meta['name'], keytype, uri, patches_meta['branch'])
|
||||
revision = buildutil.get_git_version_describe(mirrordir, patches_meta['branch'])
|
||||
patches_meta['revision'] = revision
|
||||
|
||||
for component in self.resolved_components:
|
||||
(keytype, uri) = self._parse_src_key(component['src'])
|
||||
|
|
@ -202,7 +209,7 @@ class OstbuildResolve(builtins.Builtin):
|
|||
|
||||
self.manifest['components'] = self.resolved_components
|
||||
|
||||
out_manifest = os.path.join(self.workdir, 'manifest.json')
|
||||
out_snapshot = os.path.join(self.workdir, 'snapshot.json')
|
||||
patchdir = os.path.join(self.workdir, 'patches')
|
||||
if not os.path.isdir(patchdir):
|
||||
os.mkdir(patchdir)
|
||||
|
|
@ -217,9 +224,9 @@ class OstbuildResolve(builtins.Builtin):
|
|||
dest = os.path.join(patchdir, patch)
|
||||
shutil.copy(src, dest)
|
||||
|
||||
f = open(out_manifest, 'w')
|
||||
f = open(out_snapshot, 'w')
|
||||
json.dump(self.manifest, f, indent=4)
|
||||
f.close()
|
||||
print "Created: %s, %d patches" % (out_manifest, len(all_patches.keys()))
|
||||
print "Created: %s, %d patches" % (out_snapshot, len(all_patches.keys()))
|
||||
|
||||
builtins.register(OstbuildResolve)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class OstbuildStatus(builtins.Builtin):
|
|||
|
||||
def execute(self, args):
|
||||
self.parse_config()
|
||||
build_manifest_path = os.path.join(self.workdir, 'manifest.json')
|
||||
build_manifest_path = os.path.join(self.workdir, 'snapshot.json')
|
||||
self.manifest = json.load(open(build_manifest_path))
|
||||
|
||||
for architecture in self.manifest['architectures']:
|
||||
|
|
|
|||
Loading…
Reference in New Issue