Package: pbuilder
Version: 0.127
Severity: wishlist
Tags: patch
The attached patch adds the possibility to create an experimental chroot
with pbuilder.
pbuilder create --distribution experimental
Thanks.
ciao,
ema
diff -Nur pbuilder-0.127/examples/pbuilder-distribution.sh
pbuilder-0.128/examples/pbuilder-distribution.sh
--- pbuilder-0.127/examples/pbuilder-distribution.sh 2004-11-17
00:51:38.000000000 +0100
+++ pbuilder-0.128/examples/pbuilder-distribution.sh 2005-05-12
15:59:25.000000000 +0200
@@ -1,6 +1,6 @@
#!/bin/sh
# script from Jamin W. Collins BTS: #255165
-# name this script 'pbuilder-woody', 'pbuilder-sid', 'pbuilder-sarge' etc.
+# name this script 'pbuilder-woody', 'pbuilder-sid', 'pbuilder-sarge',
'pbuilder-experimental' etc.
OPERATION=$1
DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
diff -Nur pbuilder-0.127/pbuilder.8 pbuilder-0.128/pbuilder.8
--- pbuilder-0.127/pbuilder.8 2005-04-06 01:05:02.000000000 +0200
+++ pbuilder-0.128/pbuilder.8 2005-05-12 15:58:36.000000000 +0200
@@ -180,8 +180,9 @@
Specifies the distribution used. Currently the supported values are
.B "sid"
.B "sarge"
+.B "woody"
and
-.B "woody".
+.B "experimental".
This option is only effective for
.B "pbuilder create"
diff -Nur pbuilder-0.127/pbuilder-createbuildenv
pbuilder-0.128/pbuilder-createbuildenv
--- pbuilder-0.127/pbuilder-createbuildenv 2004-12-02 00:41:32.000000000
+0100
+++ pbuilder-0.128/pbuilder-createbuildenv 2005-05-12 15:44:54.000000000
+0200
@@ -53,6 +53,10 @@
echo " -> Applying user distribution dist build script
$DEBOOTSTRAPSCRIPT"
fi
fi
+if [ "$DISTRIBUTION" = "experimental" ]; then
+ DISTRIBUTION=sid
+ EXPERIMENTAL="true"
+fi
if ! ( cd "$BUILDPLACE" && debootstrap "[EMAIL PROTECTED]" "$DISTRIBUTION" .
"$MIRRORSITE" "$DEBOOTSTRAPSCRIPT" ) ; then
echo "pbuilder: debootstrap failed" >&2
exit 1
@@ -66,6 +70,10 @@
copy_local_configuration
installaptlines
+
+if [ -n "$EXPERIMENTAL" ]; then
+ installexppreferences
+fi
echo "Refreshing the base.tgz "
echo " -> upgrading packages"
@@ -76,8 +84,8 @@
$CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES
fi
recover_aptcache
-$CHROOTEXEC /usr/bin/apt-get -y dist-upgrade
-$CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt
$EXTRAPACKAGES
+$CHROOTEXEC /usr/bin/apt-get -y --force-yes dist-upgrade
+$CHROOTEXEC /usr/bin/apt-get -y --force-yes install build-essential dpkg-dev
apt $EXTRAPACKAGES
save_aptcache
$CHROOTEXEC /usr/bin/apt-get clean
diff -Nur pbuilder-0.127/pbuilder-modules pbuilder-0.128/pbuilder-modules
--- pbuilder-0.127/pbuilder-modules 2005-04-20 00:39:50.000000000 +0200
+++ pbuilder-0.128/pbuilder-modules 2005-05-12 15:45:16.000000000 +0200
@@ -27,10 +27,10 @@
pdebuild [pbuilder-options]
command lines:
-pbuilder create [--basetgz base.tgz-path] [--distribution
potato|woody|sarge|sid]
+pbuilder create [--basetgz base.tgz-path] [--distribution
potato|woody|sarge|sid|experimental]
Creates a base.tgz
-pbuilder update [--basetgz base.tgz-path] [--distribution
potato|woody|sarge|sid]
+pbuilder update [--basetgz base.tgz-path] [--distribution
potato|woody|sarge|sid|experimental]
Updates a base.tgz
pbuilder build [--basetgz base.tgz-path] pbuilder_2.2.0-1.dsc
@@ -53,7 +53,7 @@
--nonusmirror [non-US mirror location]
--othermirror [other mirror location in apt deb-line format, delimited with |
signs]
--http-proxy [proxy]
- --distribution [distribution(potato/woody/sarge/sid)]
+ --distribution [distribution(potato/woody/sarge/sid/experimental)]
--buildresult [location-to-copy-build-result]
--aptcache [location of retrieved package files]
--removepackages [packages-to-remove on pbuilder create]
@@ -244,6 +244,19 @@
fi
}
+function installexppreferences (){
+ echo " -> Installing apt-lines and pinning for experimental"
+ if [ -n "$MIRRORSITE" ] ; then
+ echo "deb $MIRRORSITE ../project/experimental main" >>
"$BUILDPLACE"/etc/apt/sources.list
+ echo "#deb-src $MIRRORSITE ../project/experimental main" >>
"$BUILDPLACE"/etc/apt/sources.list
+ fi
+ cat >> "$BUILDPLACE"/etc/apt/preferences << EOF
+Package: *
+Pin: release o=Debian,a=experimental,l=Debian,c=main
+Pin-Priority: 500
+EOF
+}
+
function copy_local_configuration () {
echo " -> copying local configuration"
for a in hosts hostname resolv.conf; do