aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-10-04 08:20:45 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-10-05 22:31:27 +0000
commitf545a18ccde29cac917e61a0669844ca0eabea63 (patch)
tree39cbdea7caf389adab4b8e8a23fd2beeec146b48
parent015fe5bc9e7f373013b16b18f09f109646af1787 (diff)
downloadpbuilder-f545a18ccde29cac917e61a0669844ca0eabea63.tar
pbuilder-f545a18ccde29cac917e61a0669844ca0eabea63.tar.gz
Make the debdelta implementation more rubost and document the new options in the manpages
-rwxr-xr-xpbuilder-updatebuildenv24
-rw-r--r--pbuilder.87
-rw-r--r--pbuilderrc6
-rw-r--r--pbuilderrc.55
4 files changed, 37 insertions, 5 deletions
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index 713ad6e..4f5a292 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -41,11 +41,8 @@ log "I: Refreshing the base.tgz "
log "I: upgrading packages"
$CHROOTEXEC /usr/bin/apt-get -q update
-if [ "$DEBDELTA" = "yes" ]; then
- log "I: Using debdelta-upgrade for available deltas"
- $CHROOTEXEC /usr/bin/debdelta-upgrade
-fi
+# automatically add packages needed for optional features to the chroot
case "$(readlink -e "$PBUILDERSATISFYDEPENDSCMD")" in
*-aptitude)
EXTRAPACKAGES="$EXTRAPACKAGES aptitude"
@@ -61,6 +58,12 @@ else
EXTRAPACKAGES="$EXTRAPACKAGES ccache-"
fi
+if [ "$DEBDELTA" = "yes" ]; then
+ EXTRAPACKAGES="$EXTRAPACKAGES debdelta"
+else
+ EXTRAPACKAGES="$EXTRAPACKAGES debdelta-"
+fi
+
if [ -n "$REMOVEPACKAGES" ]; then
# FIXME this wont work if the packages have some reverse dependencies;
# apt-get can also remove package, either with apt-get remove or purge, or
@@ -71,6 +74,19 @@ fi
recover_aptcache
$TRAP saveaptcache_umountproc_cleanbuildplace_trap exit sighup
+if [ "$DEBDELTA" = "yes" ]; then
+ if $CHROOTEXEC which debdelta-upgrade > /dev/null 2> /dev/null ; then
+ log "I: Using debdelta-upgrade for available deltas"
+ if $CHROOTEXEC debdelta-upgrade ; then
+ :
+ else
+ log "W: debdelta failed, continue and use plain apt to update the system"
+ fi
+ else
+ log "W: debdelta is enabled but not (yet) installed, not using it"
+ fi
+fi
+
$CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" "${FORCE_CONFNEW[@]}" dist-upgrade
# autoremove: Ignore error in case of etch because apt in etch doesn't
# support autoremove. TODO: Do not ignore error when etch is no longer
diff --git a/pbuilder.8 b/pbuilder.8
index 161e19a..9e2a5ed 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -228,6 +228,13 @@ be cached. Use
if you want caching to be turned off.
.TP
+.BI "\-\-debdelta
+This option is used in the
+.B "\-\-update"
+target, and enable the use of debdelta (if it is already installed, otherwise
+will be installed the first time this option is used).
+
+.TP
.BI "\-\-configfile [" "configuration file to load" "]"
Additional configuration file to read after all other
configuration files have been read.
diff --git a/pbuilderrc b/pbuilderrc
index fddb6eb..069009e 100644
--- a/pbuilderrc
+++ b/pbuilderrc
@@ -26,7 +26,7 @@ BUILDRESULT=/var/cache/pbuilder/result/
# components on Debian use "main contrib non-free" and on Ubuntu "main
# restricted universe multiverse"
COMPONENTS="main"
-#specify the cache for APT
+#specify the cache for APT
APTCACHE="/var/cache/pbuilder/aptcache/"
APTCACHEHARDLINK="yes"
REMOVEPACKAGES=""
@@ -74,6 +74,10 @@ export APTGETOPT=()
# Option to pass to aptitude always.
export APTITUDEOPT=()
+# Whether to use debdelta or not. If "yes" debdelta will be installed in the
+# chroot
+DEBDELTA=no
+
#Command-line option passed on to dpkg-buildpackage.
#DEBBUILDOPTS="-IXXX -iXXX"
DEBBUILDOPTS=""
diff --git a/pbuilderrc.5 b/pbuilderrc.5
index 5a1f6aa..4f7d1f2 100644
--- a/pbuilderrc.5
+++ b/pbuilderrc.5
@@ -368,6 +368,11 @@ Extra flags to give to apt\-get.
Extra flags to give to aptitude.
.TP
+.BI "DEBDELTA=" "no"
+Enable use of debdelta to download the needed updated in the chroot, if
+debdelta is already installed.
+
+.TP
.BI "REMOVEPACKAGES=" "lilo"
Specify the packages to be removed on creation of
.B base.tgz