Commit 743a3f0d authored by Simon McVittie's avatar Simon McVittie

Allow apt sources to be marked as only for the build or the final product

Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 7a8219f8
......@@ -494,11 +494,13 @@ class Builder:
add=args.add_apt_source + args.add_build_apt_source,
replace=args.replace_apt_source + args.replace_build_apt_source,
remove=args.remove_apt_source + args.remove_build_apt_source,
for_build=True,
)
self.final_apt_sources = self.generate_apt_sources(
add=args.add_apt_source + args.add_final_apt_source,
replace=args.replace_apt_source + args.replace_final_apt_source,
remove=args.remove_apt_source + args.remove_final_apt_source,
for_build=False,
)
for addition in args.add_apt_keyring:
......@@ -515,6 +517,7 @@ class Builder:
add=(), # type: typing.Sequence[str]
replace=(), # type: typing.Sequence[str]
remove=(), # type: typing.Sequence[str]
for_build=False
):
# type: (...) -> typing.List[AptSource]
......@@ -550,6 +553,13 @@ class Builder:
if replaced or source['label'] in remove:
continue
if for_build:
if not source.get('for_build', True):
continue
else:
if not source.get('for_final', True):
continue
if source.get('deb', True):
apt_sources.append(AptSource(
'deb', uri, suite,
......
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