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/",
|
"netfilter": "git:git://git.netfilter.org/",
|
||||||
"cgwalters": "git:git://github.com/cgwalters/"},
|
"cgwalters": "git:git://github.com/cgwalters/"},
|
||||||
|
|
||||||
|
"patches": {"src": "gnome:ostree"},
|
||||||
|
|
||||||
"components": [
|
"components": [
|
||||||
{"src": "cgwalters:ginitscripts"},
|
{"src": "cgwalters:ginitscripts"},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ class OstbuildBuild(builtins.Builtin):
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
args = ['ostree', '--repo=' + self.repo,
|
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-buildroot-version=' + artifact_meta['buildroot-version'],
|
||||||
'--add-metadata-string=ostbuild-artifact-version=' + artifact_meta['revision'],
|
'--add-metadata-string=ostbuild-artifact-version=' + artifact_meta['revision'],
|
||||||
'--owner-uid=0', '--owner-gid=0', '--no-xattrs',
|
'--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.shell_on_failure = args.shell_on_failure
|
||||||
self.buildopts.skip_built = args.skip_built
|
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.manifest = json.load(open(build_manifest_path))
|
||||||
|
|
||||||
self.patchdir = os.path.join(self.workdir, 'patches')
|
self.patchdir = os.path.join(self.workdir, 'patches')
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class OstbuildCheckout(builtins.Builtin):
|
||||||
|
|
||||||
self.parse_config()
|
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))
|
self.manifest = json.load(open(build_manifest_path))
|
||||||
|
|
||||||
for component_name in args.components:
|
for component_name in args.components:
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class OstbuildChrootCompileOne(builtins.Builtin):
|
||||||
self.parse_config()
|
self.parse_config()
|
||||||
|
|
||||||
component_name = os.path.basename(os.getcwd())
|
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))
|
self.manifest = json.load(open(build_manifest_path))
|
||||||
|
|
||||||
if args.meta is not None:
|
if args.meta is not None:
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,13 @@ class OstbuildResolve(builtins.Builtin):
|
||||||
else:
|
else:
|
||||||
fetch_components = []
|
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:
|
for component in self.resolved_components:
|
||||||
(keytype, uri) = self._parse_src_key(component['src'])
|
(keytype, uri) = self._parse_src_key(component['src'])
|
||||||
name = component['name']
|
name = component['name']
|
||||||
|
|
@ -202,7 +209,7 @@ class OstbuildResolve(builtins.Builtin):
|
||||||
|
|
||||||
self.manifest['components'] = self.resolved_components
|
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')
|
patchdir = os.path.join(self.workdir, 'patches')
|
||||||
if not os.path.isdir(patchdir):
|
if not os.path.isdir(patchdir):
|
||||||
os.mkdir(patchdir)
|
os.mkdir(patchdir)
|
||||||
|
|
@ -217,9 +224,9 @@ class OstbuildResolve(builtins.Builtin):
|
||||||
dest = os.path.join(patchdir, patch)
|
dest = os.path.join(patchdir, patch)
|
||||||
shutil.copy(src, dest)
|
shutil.copy(src, dest)
|
||||||
|
|
||||||
f = open(out_manifest, 'w')
|
f = open(out_snapshot, 'w')
|
||||||
json.dump(self.manifest, f, indent=4)
|
json.dump(self.manifest, f, indent=4)
|
||||||
f.close()
|
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)
|
builtins.register(OstbuildResolve)
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class OstbuildStatus(builtins.Builtin):
|
||||||
|
|
||||||
def execute(self, args):
|
def execute(self, args):
|
||||||
self.parse_config()
|
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))
|
self.manifest = json.load(open(build_manifest_path))
|
||||||
|
|
||||||
for architecture in self.manifest['architectures']:
|
for architecture in self.manifest['architectures']:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue