aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog28
-rw-r--r--debian/changelog12
-rwxr-xr-xpbuilder-buildpackage35
-rwxr-xr-xpbuilder-createbuildenv2
-rw-r--r--pbuilder-modules33
-rwxr-xr-xpbuilder-updatebuildenv2
6 files changed, 85 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index abfbfb5..9f08ed8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2002-02-10 Junichi Uekawa <dancer@debian.org>
+
+ * pbuilder-buildpackage: Build-Depends-Indep etc. field names
+ are handled as case-insensitive. So "BuilD-DePeNDS-inDeP" is
+ a valid field name according to policy.
+
+ * pbuilder-updatebuildenv: uses recover_aptcache and save_aptcache.
+
+ * pbuilder-createbuildenv: added recover_aptcache, and save_aptcache
+ to the creation process.
+
+ * pbuilder-modules: recover_aptcache, save_aptcache function
+ created
+
+ * pbuilder-buildpackage: moved the recovering the aptcache
+ and saving routine out to -modules.
+
+2002-02-09 Junichi Uekawa <dancer@debian.org>
+
+ * pbuilder-modules: some message change.
+
+ * pbuilder-buildpackage: Build-[dD]epends, and
+ Build-[Dd]epends-[Ii]ndep, because many packages seem to use
+ Build-depends instead of Build-Depends, and most tools seem to
+ cope with it.
+ Likewise for Build-Conflicts.
+ fix some messages.
+
2002-02-08 Junichi Uekawa <dancer@debian.org>
* debian/changelog: release 0.21
diff --git a/debian/changelog b/debian/changelog
index edbe1b6..04fa7cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+pbuilder (0.22) unstable; urgency=low
+
+ * New version, not yet released
+ * pbuilder-buildpackage accepts case insensitive field name
+ for "Build-depends" to cope with some packages. (closes: #133054)
+ (please test)
+ * pbuilder create/update will use cached packages in addition to
+ "build". However, the packages fed to debootstrap are not cached.
+ (please test)
+
+ -- Junichi Uekawa <dancer@debian.org> Sun, 10 Feb 2002 00:17:48 +0900
+
pbuilder (0.21) unstable; urgency=low
* Accept "Noninteractive" like "noninteractive" as value of DEBIAN_FRONTEND,
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index ffdb95f..5c1286e 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -73,7 +73,9 @@ function checkbuilddep_internal () {
# Use this function to fulfill the dependency (almost)
local ARCH=$(dpkg --print-architecture)
echo " -> Attempting to parse the build-deps by myself"
- for INSTALLPKGMULTI in $(awk '/^[^ ]*:/{p=0}/^Build-Depends:/{p=1} /^Build-Depends-Indep:/{p=1} {if(p) {print $0}}' < "$BUILDPLACE/"tmp/buildd/*/debian/control | \
+ for INSTALLPKGMULTI in $(cat "$BUILDPLACE/"tmp/buildd/*/debian/control | \
+ tr 'A-Z' 'a-z' | \
+ awk '/^[^ ]*:/{p=0}/^build-depends:/{p=1} /^build-depends-indep:/{p=1} {if(p) {print $0}}' | \
sed 's/^[^:]*: //' | \
tr " " "/" | \
awk 'BEGIN{RS=","} {print}'); do
@@ -125,7 +127,9 @@ function checkbuilddep_internal () {
done;
# start processing build-conflicts.
- for INSTALLPKG in $(awk '/^[^ ]*:/{p=0}/^Build-Conflicts:/{p=1} /^Build-Conflicts-Indep:/{p=1} {if(p) {print $0}}' < "$BUILDPLACE/"tmp/buildd/*/debian/control | \
+ for INSTALLPKG in $(cat "$BUILDPLACE/"tmp/buildd/*/debian/control | \
+ tr 'A-Z' 'a-z' | \
+ awk '/^[^ ]*:/{p=0}/^build-conflicts:/{p=1} /^build-conflicts-indep:/{p=1} {if(p) {print $0}}' | \
sed 's/^[^:]*: //' | \
tr " " "/" | \
awk 'BEGIN{RS=","} {print}'); do
@@ -192,33 +196,12 @@ if ! $CHROOTEXEC /bin/bash -c "( cd tmp/buildd; /usr/bin/dpkg-source -x $(basena
exit 1;
fi
-if [ -n "$APTCACHE" ]; then
- echo "Obtaining the cached apt archive contents"
- if [ "$APTCACHEHARDLINK" = "yes" ]; then
- ln "$APTCACHE"/*.deb "$BUILDPLACE/var/cache/apt/archives/" || true
- else
- cp "$APTCACHE"/*.deb "$BUILDPLACE/var/cache/apt/archives/" || true
- fi
-fi
+recover_aptcache
echo Installing the build-deps
checkbuilddep
+save_aptcache
-if [ -n "$APTCACHE" ]; then
- echo "Copying back the cached apt archive contents"
- mkdir -p "$APTCACHE" ;
- for A in "$BUILDPLACE/var/cache/apt/archives/"*.deb; do
- if [ ! -f "$APTCACHE/"$(basename "$A") ]; then
- echo " -> new cache content "$(basename "$A")" added"
- if [ "$APTCACHEHARDLINK" = "yes" ]; then
- ln "$A" "$APTCACHE/"
- else
- cp "$A" "$APTCACHE/"
- fi
- fi
- done
-fi
-
-echo Building the package
+echo " -> Building the package"
export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
if [ -z "$DEBEMAIL" ]; then
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index 67eea80..f181b51 100755
--- a/pbuilder-createbuildenv
+++ b/pbuilder-createbuildenv
@@ -76,8 +76,10 @@ $CHROOTEXEC /usr/bin/apt-get update
if [ -n "$REMOVEPACKAGES" ]; then
$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
+save_aptcache
$CHROOTEXEC /usr/bin/apt-get clean
if [ -n "$HOOKDIR" ]; then
executehooks "X"
diff --git a/pbuilder-modules b/pbuilder-modules
index 8c6ff6b..30ff7ff 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -142,7 +142,7 @@ function extractbuildplace () {
# after calling this function, umountproc, and cleanbuildplace
# needs to be called. Please trap it.
cleanbuildplace
- echo "building the build env"
+ echo "Building the build Environment"
echo " -> extracting base.tgz"
if ! mkdir -p "$BUILDPLACE"; then
echo "E: failed to build the directory to chroot"
@@ -168,6 +168,37 @@ function extractbuildplace () {
fi
}
+
+function recover_aptcache() {
+ # recover the aptcache archive
+ if [ -n "$APTCACHE" ]; then
+ echo "Obtaining the cached apt archive contents"
+ if [ "$APTCACHEHARDLINK" = "yes" ]; then
+ ln "$APTCACHE"/*.deb "$BUILDPLACE/var/cache/apt/archives/" || true
+ else
+ cp "$APTCACHE"/*.deb "$BUILDPLACE/var/cache/apt/archives/" || true
+ fi
+ fi
+}
+
+function save_aptcache() {
+ # save the current aptcache archive
+ if [ -n "$APTCACHE" ]; then
+ echo "Copying back the cached apt archive contents"
+ mkdir -p "$APTCACHE" ;
+ for A in "$BUILDPLACE/var/cache/apt/archives/"*.deb; do
+ if [ ! -f "$APTCACHE/"$(basename "$A") ]; then
+ echo " -> new cache content "$(basename "$A")" added"
+ if [ "$APTCACHEHARDLINK" = "yes" ]; then
+ ln "$A" "$APTCACHE/"
+ else
+ cp "$A" "$APTCACHE/"
+ fi
+ fi
+ done
+ fi
+}
+
#required for some packages to install...
export LANG=C
export LC_ALL=C
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index 96d8418..41c8876 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -36,8 +36,10 @@ echo "Refreshing the base.tgz "
echo " -> upgrading packages"
$CHROOTEXEC /usr/bin/apt-get update
$CHROOTEXEC /usr/bin/dpkg --purge lilo
+recover_aptcache
$CHROOTEXEC /usr/bin/apt-get -y dist-upgrade
$CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt $EXTRAPACKAGES
+save_aptcache
$CHROOTEXEC /usr/bin/apt-get clean
if [ -n "$HOOKDIR" ]; then