[X2Go-Commits] [buildscripts] 01/01: bin/sbuild-deb-package: only skip source packages if they only contain arch-indep binary packages.

git-admin at x2go.org git-admin at x2go.org
Thu Nov 30 06:36:26 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit e56648ac7fe7a07356e4b85206c7eb12e1c2375e
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Nov 30 06:35:24 2017 +0100

    bin/sbuild-deb-package: only skip source packages if they only contain arch-indep binary packages.
---
 bin/sbuild-deb-package | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package
index e1c33f8..7f0530b 100755
--- a/bin/sbuild-deb-package
+++ b/bin/sbuild-deb-package
@@ -469,7 +469,15 @@ build_packages() {
 
 				typeset base_arch="${arches[0]}"
 				if [ -n "${base_arch}" ] && [ "x${SKIP_ARCH}" != "x${base_arch}" ] && grep -Eqs "Architecture.*(all|any|${base_arch})" "${TEMP_DIR}/${PROJECT}/debian/control"; then
-					if ! grep -Eqs 'Architecture.*all' "${TEMP_DIR}/${PROJECT}/debian/control" || [ "${skip_arch_all}" -eq "0" ]; then
+					# Debian source packages define one or more binary package(s), which
+					# can either be arch-indep or arch-dep.
+					# Just blindly looking for "Architecture: all" binary packages is not
+					# a good selector for skipping source packages entirely, as the
+					# source package can still also define arch-dep binary packages.
+					typeset -i has_arch_dep="0"
+					grep -Eqs "Architecture.*(any|${base_arch})" "${TEMP_DIR}/${PROJECT}/debian/control" && has_arch_dep="1"
+
+					if [ "${has_arch_dep}" -eq "1" ] || [ "${skip_arch_all}" -eq "0" ]; then
 						typeset indirect="sbuild_options_${base_arch}[@]"
 						typeset -a indirect_resolve
 						indirect_resolve=("${!indirect}")

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/buildscripts.git


More information about the x2go-commits mailing list