Package: pbuilder
Version: 0.121
Severity: wishlist
Tags: patch

An option to specify the location of the apt cache would be useful, for
instance, when using pbuilder to build packages for both Debian and a
derivative on the same system. One could use it to ensure that debs from
Debian proper and from the derivative would never be mixed.

The patch to implement this is really minimal and non-intrusive, and
does not change default behaviour either. I believe I have included all
the necessary documentation.

Best Regards,
Danilo

-- 
Danilo Piazzalunga                     +--------------------+
PGP Key available at subkeys.pgp.net   | Linux User #245762 |
Fingerprint: D018 815E 8C7F 2AE2 5565  | ICQ #105550412     |
             0C36 B5F6 DB20 B800 CB9F  +--------------------+
diff -Nru pbuilder-0.121.orig/pbuilder.8 pbuilder-0.121/pbuilder.8
--- pbuilder-0.121.orig/pbuilder.8      2004-11-19 13:14:45.000000000 +0100
+++ pbuilder-0.121/pbuilder.8   2005-02-17 23:45:25.160570912 +0100
@@ -192,6 +192,13 @@
 option.
 
 .TP
+.BI "--aptcache [" "location of retrieved package files" "]"
+Specifies the location where the packages downloaded by apt should
+be cached. Use
+.B "--aptcache """""
+if you want caching to be turned off.
+
+.TP
 .BI "--removepackages [" "packages to remove" "]"
 Removes the packages on creating the 
 .BR "base.tgz" "."
@@ -308,7 +315,7 @@
 
 Specifies that dpkg-buildpackage be called with
 .B "-m$DEBEMAIL"
-instead of default value specified in the environmental
+instead of default value specified in the environment
 variable, or pbuilderrc
 
 .B "This option is almost obsolete, use --debbuildopts instead"
diff -Nru pbuilder-0.121.orig/pbuilder-checkparams 
pbuilder-0.121/pbuilder-checkparams
--- pbuilder-0.121.orig/pbuilder-checkparams    2005-01-04 02:44:39.000000000 
+0100
+++ pbuilder-0.121/pbuilder-checkparams 2005-02-17 23:28:52.658454168 +0100
@@ -92,6 +92,19 @@
            fi
            shift; shift;
            ;;
+       --aptcache)
+           if [ -n "$2" ]; then
+               if [ -d "$2" ]; then
+                   APTCACHE=$(readlink -f "$2");
+               else
+                   echo "E: Directory $2 does not exist" >&2 
+                   exit 1
+               fi
+           else
+               APTCACHE=
+           fi
+           shift; shift;
+           ;;
        --removepackages)
            REMOVEPACKAGES="$2";
            shift; shift;
diff -Nru pbuilder-0.121.orig/pbuilder-modules pbuilder-0.121/pbuilder-modules
--- pbuilder-0.121.orig/pbuilder-modules        2005-01-04 02:44:47.000000000 
+0100
+++ pbuilder-0.121/pbuilder-modules     2005-02-17 23:28:47.079302328 +0100
@@ -55,6 +55,7 @@
  --http-proxy [proxy]
  --distribution [distribution(potato/woody/sid)]
  --buildresult [location-to-copy-build-result]
+ --aptcache [location of retrieved package files]
  --removepackages [packages-to-remove on pbuilder create]
  --extrapackages [packages-to-add on pbuilder create]
  --configfile [configuration file to load]

Reply via email to