debian: Fail build if no module dependencies found

debian/rules uses --list-dependencies to collect the dependencies of
all essential modules. Ensure that the list is not empty.

Helps #2149.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2021-11-13 07:16:11 -05:00 committed by Sunil Mohan Adapa
parent aaea6bf00e
commit 122bda7f7e
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

2
debian/rules vendored
View File

@ -10,6 +10,8 @@ override_dh_auto_install-indep:
dh_auto_install
./run --develop --list-dependencies | sort | tr '\n' ', ' | \
sed -e 's/^/freedombox:Depends=/' >> debian/freedombox.substvars
# Ensure the list of dependencies is not empty.
test -s debian/freedombox.substvars || exit 1
# pybuild can run pytest. However, when the top level directory is included in
# the path (done using manage.py), it results in import problems.