aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpbuilder-satisfydepends-aptitude4
-rwxr-xr-xpbuilder-satisfydepends-classic4
-rwxr-xr-xpbuilder-satisfydepends-experimental4
-rwxr-xr-xpbuilder-satisfydepends-funcs10
-rwxr-xr-xtest_pbuilder-satisfydepends-funcs7
5 files changed, 20 insertions, 9 deletions
diff --git a/pbuilder-satisfydepends-aptitude b/pbuilder-satisfydepends-aptitude
index d685477..1031497 100755
--- a/pbuilder-satisfydepends-aptitude
+++ b/pbuilder-satisfydepends-aptitude
@@ -62,8 +62,8 @@ function checkbuilddep_internal () {
local DEPENDS
local CONFLICTS
echo " -> Attempting to satisfy build-dependencies"
- DEPENDS="$(get_control_re "$DEBIAN_CONTROL" "$BD_REGEXP" | filter_arch_deps "$ARCH")"
- CONFLICTS="$(get_control_re "$DEBIAN_CONTROL" "$BC_REGEXP" | filter_arch_deps "$ARCH")"
+ DEPENDS="$(get_build_deps | filter_arch_deps "$ARCH")"
+ CONFLICTS="$(get_build_conflicts | filter_arch_deps "$ARCH")"
echo " -> Creating pbuilder-satisfydepends-dummy package"
BUILD_DEP_DEB_DIR="/tmp/satisfydepends-aptitude"
BUILD_DEP_DEB_CONTROL="$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy/DEBIAN/control"
diff --git a/pbuilder-satisfydepends-classic b/pbuilder-satisfydepends-classic
index 616e414..f15af79 100755
--- a/pbuilder-satisfydepends-classic
+++ b/pbuilder-satisfydepends-classic
@@ -35,7 +35,7 @@ function checkbuilddep_internal () {
local SATISFIED
local APTFLAG="-o APT::Install-Recommends=false"
echo " -> Attempting to parse the build-deps "
- for INSTALLPKGMULTI in $(get_control_re "$DEBIAN_CONTROL" "$BD_REGEXP" |
+ for INSTALLPKGMULTI in $(get_build_deps |
tr " " "/" | \
awk 'BEGIN{RS=","} {print}'); do
echo " -> Considering build-dep$(echo "$INSTALLPKGMULTI" | tr "/" " " )"
@@ -113,7 +113,7 @@ function checkbuilddep_internal () {
fi
# start processing build-conflicts.
- for INSTALLPKG in $(get_control_re "$DEBIAN_CONTROL" "$BC_REGEXP" |
+ for INSTALLPKG in $(get_build_conflicts |
tr " " "/" | \
awk 'BEGIN{RS=","} {print}'); do
CURRENTREALPKGNAME=$(echo "$INSTALLPKG" | sed -e 's#^/*##' -e 's#[[/(].*##')
diff --git a/pbuilder-satisfydepends-experimental b/pbuilder-satisfydepends-experimental
index 4561313..534d19a 100755
--- a/pbuilder-satisfydepends-experimental
+++ b/pbuilder-satisfydepends-experimental
@@ -39,7 +39,7 @@ function checkbuilddep_internal () {
local CANDIDATE_VERSION
local APTFLAG="-o APT::Install-Recommends=false"
echo " -> Attempting to parse the build-deps"
- for INSTALLPKGMULTI in $(get_control_re "$DEBIAN_CONTROL" "$BD_REGEXP" |
+ for INSTALLPKGMULTI in $(get_build_deps |
tr " " "/" | \
awk 'BEGIN{RS=","} {print}'); do
echo " -> Considering build-dep$(echo "$INSTALLPKGMULTI" | tr "/" " " )"
@@ -136,7 +136,7 @@ function checkbuilddep_internal () {
fi
# start processing build-conflicts.
- for INSTALLPKG in $(get_control_re "$DEBIAN_CONTROL" "$BC_REGEXP" |
+ for INSTALLPKG in $(get_build_conflicts |
tr " " "/" | \
awk 'BEGIN{RS=","} {print}'); do
CURRENTREALPKGNAME=$(echo "$INSTALLPKG" | sed -e 's#^/*##' -e 's#[[/(].*##')
diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index 876ab42..430b590 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -79,6 +79,16 @@ 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 "$DEBIAN_CONTROL" "$BD_REGEXP"
+}
+
+get_build_conflicts() {
+ get_control_re "$DEBIAN_CONTROL" "$BC_REGEXP"
+}
+
checkbuilddep_archdeps() {
# returns FALSE on INSTALL
local INSTALLPKG="$1"
diff --git a/test_pbuilder-satisfydepends-funcs b/test_pbuilder-satisfydepends-funcs
index 26bf94c..5512bd6 100755
--- a/test_pbuilder-satisfydepends-funcs
+++ b/test_pbuilder-satisfydepends-funcs
@@ -6,6 +6,7 @@
# testsuite to test pbuilder-satisfydepends-funcs.
DEBIAN_CONTROL=""
+BD_REGEXP="build-(depends|depends-indep)"
cleanup() {
if [ -n "$DEBIAN_CONTROL" ]; then
@@ -13,7 +14,7 @@ cleanup() {
fi
}
-test_get_control_re() {
+test_get_build_deps() {
cat <<EOF >"$DEBIAN_CONTROL"
Source: amule
XXXX:
@@ -33,7 +34,7 @@ Description: test
other things
wow
EOF
- get_control_re "$DEBIAN_CONTROL" "build-(depends|depends-indep)"
+ get_build_deps
}
trap cleanup sigpipe sighup exit
@@ -42,6 +43,6 @@ 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_control_re
+ test, test1, test2, test3 | test4, test5" test_get_build_deps
testlib_summary