diff options
-rwxr-xr-x | pbuilder-updatebuildenv | 24 | ||||
-rw-r--r-- | pbuilder.8 | 7 | ||||
-rw-r--r-- | pbuilderrc | 6 | ||||
-rw-r--r-- | pbuilderrc.5 | 5 |
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 @@ -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. @@ -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 |