Commit a446d60e authored by Frederic Danis's avatar Frederic Danis

apps: Allow to use remote repository for runtime

The remote-url allows to set a remote url instead of a local directory
to use for Platform and SDK runtime.
Signed-off-by: Frederic Danis's avatarFrédéric Danis <frederic.danis@collabora.com>
parent 4447efbe
......@@ -217,6 +217,7 @@ class Builder:
self.xdg_cache_dir, 'flatdeb',
)
self.ostree_repo = os.path.join(self.build_area, 'ostree-repo')
self.remote_url = 'file://{}'.format(urllib.parse.quote(self.ostree_repo))
self.__dpkg_archs = [] # type: typing.Sequence[str]
self.flatpak_arch = None # type: typing.Optional[str]
......@@ -404,6 +405,7 @@ class Builder:
)
parser.add_argument('--build-area', default=self.build_area)
parser.add_argument('--ostree-repo', default=self.ostree_repo)
parser.add_argument('--remote-url', default=self.remote_url)
parser.add_argument(
'--ostree-commit', action='store_true', default=self.ostree_commit,
)
......@@ -590,6 +592,7 @@ class Builder:
self.runtime_branch = args.runtime_branch
self.ostree_commit = args.ostree_commit
self.ostree_repo = args.ostree_repo
self.remote_url = args.remote_url
self.export_bundles = args.export_bundles
self.ostree_mode = args.ostree_mode
self.strict = args.strict
......@@ -1761,14 +1764,14 @@ class Builder:
'flatpak', '--user',
'remote-add', '--if-not-exists', '--no-gpg-verify',
'flatdeb',
'file://{}'.format(urllib.parse.quote(self.ostree_repo)),
'{}'.format(self.remote_url),
])
subprocess.check_call([
'env',
'XDG_DATA_HOME={}/home'.format(scratch),
'flatpak', '--user',
'remote-modify', '--no-gpg-verify',
'--url=file://{}'.format(urllib.parse.quote(self.ostree_repo)),
'--url={}'.format(self.remote_url),
'flatdeb',
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment