| |
@@ -678,6 +678,9 @@
|
| |
# Run flatpak-build-finish to add extra metadata, based on finish-args
|
| |
self._build_finish(builddir)
|
| |
|
| |
+ with open(os.path.join(builddir, 'metadata'), 'r') as f:
|
| |
+ metadata = f.read()
|
| |
+
|
| |
runtime_ref = 'runtime/{id}/{arch}/{branch}'.format(**args)
|
| |
|
| |
subprocess.check_call(['ostree', 'commit',
|
| |
@@ -685,6 +688,7 @@
|
| |
'--owner-gid=0', '--no-xattrs',
|
| |
'--canonical-permissions',
|
| |
'--branch', runtime_ref,
|
| |
+ '--add-metadata-string', 'xa.metadata=' + metadata,
|
| |
'-s', 'build of ' + runtime_ref,
|
| |
'--tree=tar=' + tarred_filesystem,
|
| |
'--tree=dir=' + builddir])
|
| |
I checked the full set of metadata for all Flatpaks and runtimes on my system and they are all ascii-only (and almost everything in the metadata looks inherently ascii only) - so this is probably fine - for Python2, it will give a byte string, and for Python3, it will interpret the data according to the locale's encoding.