diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | pbuilder-satisfydepends | 28 |
3 files changed, 37 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2003-01-28 Junichi Uekawa <dancer@debian.org> + + * pbuilder-satisfydepends: apply patch from Daniel Schepler <schepler@math.berkeley.edu>, + fixing obvious typos. Bug: 178552 + 2003-01-18 Junichi Uekawa <dancer@debian.org> * THANKS: update. diff --git a/debian/changelog b/debian/changelog index 76c31f5..012383e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +pbuilder (0.64) UNRELEASED; urgency=low + + * Apply patch from Daniel Schepler <schepler@math.berkeley.edu>, + to improve speed of build-dep satisfying routine. + (closes: #178552) + + -- Junichi Uekawa <dancer@debian.org> Tue, 28 Jan 2003 22:31:54 +0900 + pbuilder (0.63) unstable; urgency=low * pbuilder-modules; doit=cp, instead of doit=ln -s. 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}" | \ |