aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-11-07 21:23:51 +0900
committerJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-11-07 21:23:51 +0900
commitdd6a872337b92553ba8164c47279e510cdb00926 (patch)
treecf4a11a7ce541514c248d75b119540795cfc72c0
parent26ea72533e3c52afb85cfa1318399f0716465aa0 (diff)
downloadpbuilder-dd6a872337b92553ba8164c47279e510cdb00926.tar
pbuilder-dd6a872337b92553ba8164c47279e510cdb00926.tar.gz
pbuilder-satisfydepends-experimental: ignore Recommends
-rw-r--r--ChangeLog5
-rwxr-xr-xpbuilder-satisfydepends-experimental17
-rw-r--r--testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.dsc10
-rw-r--r--testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.tar.gzbin0 -> 1303 bytes
-rw-r--r--testsuite/random-manual-test-material/build-depends-on-experimental/config3
5 files changed, 29 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a794b3..112dbf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-11-07 Junichi Uekawa <dancer@debian.org>
+ * testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.dsc:
+ add sample files for easier testing.
+
+ * pbuilder-satisfydepends-experimental: add APTFLAG here also.
+
* pbuilder-satisfydepends-classic: add APTFLAG, which is "-o
APT::Install-Recommends=false" to toggle recommends
installation. This option is ignored by etch apt, so should be
diff --git a/pbuilder-satisfydepends-experimental b/pbuilder-satisfydepends-experimental
index 3fd0c5d..4561313 100755
--- a/pbuilder-satisfydepends-experimental
+++ b/pbuilder-satisfydepends-experimental
@@ -19,6 +19,10 @@
#
# module to satisfy build dependencies; experimental flavor
+# can test this with:
+# testsuite/random-manual-test-material/build-depends-on-experimental:
+# sudo pbuilder --build --configfile config bde_0.1.dsc
+
set -e
. /usr/lib/pbuilder/pbuilder-satisfydepends-funcs
@@ -33,6 +37,7 @@ function checkbuilddep_internal () {
local SATISFIED
local PACKAGEVERSIONS
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" |
tr " " "/" | \
@@ -54,7 +59,7 @@ function checkbuilddep_internal () {
while [ "$SATISFIED" = "no" ]; do
echo " -> Trying to add $CURRENT_APT_COMMAND"
- if APT_OUTPUT="$( exec 2>&1; LC_ALL=C $CHROOTEXEC /usr/bin/apt-get -s install $INSTALLPKGLIST $CURRENT_APT_COMMAND )"; then
+ if APT_OUTPUT="$( exec 2>&1; LC_ALL=C $CHROOTEXEC /usr/bin/apt-get -s install $APTFLAG $INSTALLPKGLIST $CURRENT_APT_COMMAND )"; then
# success, we're done
SATISFIED="yes"
INSTALLPKGLIST="$INSTALLPKGLIST $CURRENT_APT_COMMAND"
@@ -85,7 +90,7 @@ function checkbuilddep_internal () {
fi
echo " -> Cannot install $CURRENT_APT_COMMAND; apt errors follow:"
- if $CHROOTEXEC /usr/bin/apt-get -s install $INSTALLPKGLIST "$CURRENT_APT_COMMAND"; then
+ if $CHROOTEXEC /usr/bin/apt-get -s install $APTFLAG $INSTALLPKGLIST "$CURRENT_APT_COMMAND"; then
:
fi
# package could not be found. -- looking for alternative.
@@ -94,13 +99,13 @@ function checkbuilddep_internal () {
if [ -n "$PROVIDED" ]; then
# something provides this package
echo " -> Considering $PROVIDED to satisfy the dependency "
- if $CHROOTEXEC /usr/bin/apt-get -s install $INSTALLPKGLIST $PROVIDED >& /dev/null; then
+ if $CHROOTEXEC /usr/bin/apt-get -s install $APTFLAG $INSTALLPKGLIST $PROVIDED >& /dev/null; then
SATISFIED="yes";
INSTALLPKGLIST="$INSTALLPKGLIST $PROVIDED"
else
# show the error for diagnostic purposes
echo " -> Cannot install $PROVIDED; apt errors follow:"
- if $CHROOTEXEC /usr/bin/apt-get -s install $INSTALLPKGLIST $PROVIDED; then
+ if $CHROOTEXEC /usr/bin/apt-get -s install $APTFLAG $INSTALLPKGLIST $PROVIDED; then
:
fi
fi
@@ -119,10 +124,10 @@ function checkbuilddep_internal () {
# now actually install the packages
echo " -> Installing $INSTALLPKGLIST"
- if ! $CHROOTEXEC apt-get -y --force-yes install $INSTALLPKGLIST; then
+ if ! $CHROOTEXEC apt-get -y --force-yes $APTFLAG install $INSTALLPKGLIST; then
echo " -> Trying to fix apt error"
# Work around an apt bug which causes configure to fail.
- if $CHROOTEXEC dpkg --configure --pending && $CHROOTEXEC apt-get -y --force-yes install $INSTALLPKGLIST; then
+ if $CHROOTEXEC dpkg --configure --pending && $CHROOTEXEC apt-get -y --force-yes $APTFLAG install $INSTALLPKGLIST; then
echo " -> Apt bug workaround succeeded"
elif [ "$CONTINUE_FAIL" != "yes" ]; then
echo "E: Unrecoverable error installing build-dependencies." >&2
diff --git a/testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.dsc b/testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.dsc
new file mode 100644
index 0000000..d64c7bf
--- /dev/null
+++ b/testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.dsc
@@ -0,0 +1,10 @@
+Format: 1.0
+Source: bde
+Binary: bde
+Architecture: any
+Version: 0.1
+Maintainer: Junichi Uekawa <dancer@debian.org>
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 5), gcc (>= 4:4.3)
+Files:
+ d05f9f50eba6d58e28ca057477ada436 1303 bde_0.1.tar.gz
diff --git a/testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.tar.gz b/testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.tar.gz
new file mode 100644
index 0000000..a805bd4
--- /dev/null
+++ b/testsuite/random-manual-test-material/build-depends-on-experimental/bde_0.1.tar.gz
Binary files differ
diff --git a/testsuite/random-manual-test-material/build-depends-on-experimental/config b/testsuite/random-manual-test-material/build-depends-on-experimental/config
new file mode 100644
index 0000000..2999af4
--- /dev/null
+++ b/testsuite/random-manual-test-material/build-depends-on-experimental/config
@@ -0,0 +1,3 @@
+# test with
+# sudo pbuilder --build --configfile config bde_0.1.dsc
+PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-experimental"