aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpbuilder-satisfydepends-checkparams9
-rwxr-xr-xpbuilder-satisfydepends-funcs12
-rwxr-xr-xtest_pbuilder-satisfydepends-funcs10
3 files changed, 19 insertions, 12 deletions
diff --git a/pbuilder-satisfydepends-checkparams b/pbuilder-satisfydepends-checkparams
index 733fdd4..16e418d 100755
--- a/pbuilder-satisfydepends-checkparams
+++ b/pbuilder-satisfydepends-checkparams
@@ -22,8 +22,7 @@
DEBIAN_CONTROL=debian/control
CHROOT=""
CHROOTEXEC=""
-BD_REGEXP="build-(depends|depends-indep)"
-BC_REGEXP="build-(conflicts|conflicts-indep)"
+BINARY_ARCH="no"
FORCEVERSION=""
CONTINUE_FAIL="no"
CHROOTEXEC_AFTER_INTERNAL_CHROOTEXEC=no
@@ -58,13 +57,11 @@ while [ -n "$1" ]; do
;;
--binary-all)
- BD_REGEXP='build-(depends|depends-indep)'
- BC_REGEXP='build-(conflicts|conflicts-indep)'
+ BINARY_ARCH="no"
shift
;;
--binary-arch)
- BD_REGEXP='build-depends'
- BC_REGEXP='build-conflicts'
+ BINARY_ARCH="yes"
shift
;;
--continue-fail)
diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index 98cb806..58e598c 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -78,14 +78,18 @@ get_control_re() {
sed 's/^[^: ]*://'
}
-# NB: BD_REGEXP only includes Build-Depends-Indep when building binary-indep
-# packages; see pbuilder-satisfydepends-checkparams
get_build_deps() {
- get_control_re "$BD_REGEXP"
+ get_control_re "build-depends"
+ if [ "$BINARY_ARCH" = no ]; then
+ get_control_re "build-depends-indep"
+ fi
}
get_build_conflicts() {
- get_control_re "$BC_REGEXP"
+ get_control_re "build-conflicts"
+ if [ "$BINARY_ARCH" = no ]; then
+ get_control_re "build-conflicts-indep"
+ fi
}
checkbuilddep_archdeps() {
diff --git a/test_pbuilder-satisfydepends-funcs b/test_pbuilder-satisfydepends-funcs
index 5512bd6..9ce38c7 100755
--- a/test_pbuilder-satisfydepends-funcs
+++ b/test_pbuilder-satisfydepends-funcs
@@ -6,7 +6,6 @@
# testsuite to test pbuilder-satisfydepends-funcs.
DEBIAN_CONTROL=""
-BD_REGEXP="build-(depends|depends-indep)"
cleanup() {
if [ -n "$DEBIAN_CONTROL" ]; then
@@ -15,6 +14,10 @@ cleanup() {
}
test_get_build_deps() {
+ local BINARY_ARCH
+
+ BINARY_ARCH="$1"
+
cat <<EOF >"$DEBIAN_CONTROL"
Source: amule
XXXX:
@@ -43,6 +46,9 @@ trap cleanup sigpipe sighup exit
DEBIAN_CONTROL="$(tempfile)"
expect_output " autotools-dev, debhelper, quilt, libwxgtk2.8-dev
- test, test1, test2, test3 | test4, test5" test_get_build_deps
+ test, test1, test2, test3 | test4, test5" \
+ test_get_build_deps "no"
+expect_output " autotools-dev, debhelper, quilt, libwxgtk2.8-dev" \
+ test_get_build_deps "yes"
testlib_summary