diff --git a/debian/control b/debian/control index 24c45f8913f8d95e48ee7ef48372b672add0a938..1d26921cf47452b4cfeca008b184a3e89f2b737d 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ Package: pbuilder Architecture: all Multi-Arch: foreign Depends: - debootstrap | cdebootstrap, + debootstrap (>= 1.0.97) | cdebootstrap, dpkg-dev (>= 1.17.0), ${misc:Depends}, Recommends: diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index 07acc98ef0db54610e02bbbb5623dc244484bda2..9d4381e12fcaad71ac4ab1673ba88b2252bcfbee 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -64,12 +64,18 @@ else exit 1 fi +# use cache for debootstrap +if [ -n "$APTCACHE" ] && [ "${DEBOOTSTRAP}" = debootstrap -o "${DEBOOTSTRAP}" = qemu-debootstrap ]; then + USE_CACHE="--cache-dir=$APTCACHE" +fi + # FIXME if the end-user passes another --include= to debootstrap in # DEBOOTSTRAPOPTS, it will override the --include=apt one and apt might not be # installed if ! ( "${DEBOOTSTRAP}" \ ${ARCHITECTURE:+--arch=$ARCHITECTURE} \ --include=apt \ + "$USE_CACHE" \ "${DEBOOTSTRAPOPTS[@]}" \ "$DISTRIBUTION" \ "$BUILDPLACE" \