aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-satisfydepends
diff options
context:
space:
mode:
authordancer <dancer>2003-01-28 13:34:03 +0000
committerdancer <dancer>2003-01-28 13:34:03 +0000
commita1c7af8b98aaacc6a62e47e3100aed89edb2ec14 (patch)
tree7ba417b1fb1de86c833f004514fe415791b7e065 /pbuilder-satisfydepends
parent8d7597921e46b53b0dbebc49ae015a351cda3d2b (diff)
downloadpbuilder-a1c7af8b98aaacc6a62e47e3100aed89edb2ec14.tar
pbuilder-a1c7af8b98aaacc6a62e47e3100aed89edb2ec14.tar.gz
apply patch from Daniel Schelper.
Diffstat (limited to 'pbuilder-satisfydepends')
-rw-r--r--pbuilder-satisfydepends28
1 files changed, 24 insertions, 4 deletions
diff --git a/pbuilder-satisfydepends b/pbuilder-satisfydepends
index 30c1a0e..4bc299d 100644
--- a/pbuilder-satisfydepends
+++ b/pbuilder-satisfydepends
@@ -68,6 +68,7 @@ function checkbuilddep_internal () {
local ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
local INSTALLPKG
+ local INSTALLPKGLIST
local INSTALLPKGMULTI
local CURRENTREALPKGNAME
local SATISFIED
@@ -103,19 +104,25 @@ tolower($0) ~ /^'"${BD_REGEXP}"':/ {p=1}
continue;
fi
fi
- echo " -> Installing "${CURRENTREALPKGNAME}
+ echo " -> Trying "${CURRENTREALPKGNAME}
- if $CHROOTEXEC /usr/bin/apt-get -y install ${CURRENTREALPKGNAME}; then
+ if $CHROOTEXEC /usr/bin/apt-get -s install ${INSTALLPKGLIST} ${CURRENTREALPKGNAME} >& /dev/null; then
SATISFIED="yes"
+ INSTALLPKGLIST="${INSTALLPKGLIST} ${CURRENTREALPKGNAME}"
else
# package could not be found. -- looking for alternative.
PROVIDED=""
checkbuilddep_provides ${CURRENTREALPKGNAME}
if [ -n "$PROVIDED" ]; then
# something provides this package
- echo " -> Installing $PROVIDED to satisfy the dependency "
- if $CHROOTEXEC /usr/bin/apt-get -y install $PROVIDED; then
+ echo " -> Considering $PROVIDED to satisfy the dependency "
+ if $CHROOTEXEC /usr/bin/apt-get -s install ${INSTALLPKGLIST} ${PROVIDED} >& /dev/null; then
SATISFIED="yes";
+ INSTALLPKGLIST="${INSTALLPKGLIST} ${PROVIDED}"
+ else
+ # show the error for diagnostic purposes
+ echo " -> Cannot install $PROVIDED; apt errors follow:"
+ $CHROOTEXEC /usr/bin/apt-get -s install ${INSTALLPKGLIST} ${PROVIDED}
fi
fi
fi
@@ -130,6 +137,19 @@ tolower($0) ~ /^'"${BD_REGEXP}"':/ {p=1}
fi
fi
done;
+
+ # now actually install the packages
+ echo " -> Installing ${INSTALLPKGLIST}"
+ if ! $CHROOTEXEC apt-get -y 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 install ${INSTALLPKGLIST}; then
+ echo " -> Apt bug workaround succeeded"
+ elif [ "$CONTINUE_FAIL" != "yes" ]; then
+ echo "E: Unrecoverable error installing build-dependencies." >&2
+ exit 1
+ fi
+ fi
# start processing build-conflicts.
for INSTALLPKG in $(cat "${DEBIAN_CONTROL}" | \