build: package: fail gracefully if --src and dependencies need building (MR 2363)

If you build a package with --src but some dep is outdated, force you
to build it (or otherwise handle the situation yourself). We can't guess
what to do here.

This could be made configurable (opt-in) in the future.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-07-11 01:14:08 +02:00
parent d2f40a9a29
commit 889a1e011d
No known key found for this signature in database
GPG key ID: 0583312B195F64B6

View file

@ -431,6 +431,12 @@ def packages(
for item in build_queue:
logging.info(f" @BLUE@*@END@ {item['channel']}/{item['name']}")
if len(build_queue) > 1 and src:
raise RuntimeError(
"Additional packages need building, please build them first and then"
" build the package with --src again."
)
cross = None
for pkg in build_queue: