diff options
author | Adrien Cunin <adri2000@ubuntu.com> | 2007-10-22 08:28:02 +0900 |
---|---|---|
committer | Junichi Uekawa <dancer@dancer64.netfort.gr.jp> | 2007-10-22 08:28:02 +0900 |
commit | a6996a19f78e81fe000bb87f9911311c5d76be9b (patch) | |
tree | 6150e866e710d8fae26a431257613bc098019f87 | |
parent | f6f2a0cc64cf6756e1b3d7ba880a7debe3d028a4 (diff) | |
download | pbuilder-a6996a19f78e81fe000bb87f9911311c5d76be9b.tar pbuilder-a6996a19f78e81fe000bb87f9911311c5d76be9b.tar.gz |
[Pbuilder-maint] Bug#422371: Patch for specifying components
Here is a patch against latest git revision which adds the ability to specify
the components either via $COMPONENTS in pbuilderrc or via the command line with
--components.
It is based on some of the Ubuntu changes [1].
[1] http://patches.ubuntu.com/p/pbuilder/pbuilder_0.170ubuntu1.patch
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | pbuilder-checkparams | 4 | ||||
-rw-r--r-- | pbuilder-modules | 8 | ||||
-rw-r--r-- | pbuilder.8 | 19 | ||||
-rwxr-xr-x | pbuilderrc | 2 | ||||
-rw-r--r-- | pbuilderrc.5 | 11 |
6 files changed, 40 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index 891e7d2..4cdc5c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,15 @@ pbuilder (0.174) UNRELEASED; urgency=low + [ Junichi Uekawa ] * add bash_completion. * Bug fix: "pbuilder: incoherence man page with --help", thanks to David Vernazobres (Closes: #446479). + [ Adrien Cunin ] + * Added the ability to specify the distribution components via $COMPONENTS in + pbuilderrc or via pbuilder --components. Part of the patch taken from + Ubuntu. (Closes: #422371) + -- Junichi Uekawa <dancer@debian.org> Mon, 15 Oct 2007 08:44:20 +0900 pbuilder (0.173) unstable; urgency=low diff --git a/pbuilder-checkparams b/pbuilder-checkparams index 89cda72..34b4a42 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -75,6 +75,10 @@ while [ -n "$1" ]; do DISTRIBUTION="$2"; shift; shift; ;; + --components) + COMPONENTS="$2"; + shift; shift; + ;; --buildresult) if [ -n "$2" ]; then if [ -d "$2" ]; then diff --git a/pbuilder-modules b/pbuilder-modules index d62e2f4..1669038 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -54,6 +54,7 @@ pbuilder-options: --othermirror [other mirror location in apt deb-line format, delimited with | signs] --http-proxy [proxy] --distribution [distribution(sid|etch|lenny|experimental)] + --components [components] --buildresult [location-to-copy-build-result] --aptcache [location of retrieved package files] --removepackages [packages-to-remove on pbuilder create] @@ -299,13 +300,16 @@ function installaptlines (){ echo "Distribution not specified, please specify" >&2 exit 1 fi + if [ -z "$COMPONENTS" ] ; then + COMPONENTS="main" + fi if [ -n "$OTHERMIRROR" ]; then echo "$OTHERMIRROR" | tr "|" "\n" >> "$BUILDPLACE"/etc/apt/sources.list fi if [ -n "$MIRRORSITE" ] ; then cat >> "$BUILDPLACE"/etc/apt/sources.list << EOF -deb $MIRRORSITE $DISTRIBUTION main -#deb-src $MIRRORSITE $DISTRIBUTION main +deb $MIRRORSITE $DISTRIBUTION $COMPONENTS +#deb-src $MIRRORSITE $DISTRIBUTION $COMPONENTS EOF fi if [ -n "$APTCONFDIR" ]; then @@ -189,18 +189,21 @@ and .B "experimental". .TP -.BI "\-\-override\-config" +.BI "\-\-components [" "components" "]" +Specifies the default distribution components to use. eg. "main contrib non-free". +Default is "main". -Specify to use different apt set up inside the chroot than it was used for creating the -base.tgz. -Specify this when you want to do +.TP +.BI "\-\-override\-config" +Specify to use different apt set up inside the chroot than it was used for creating the base.tgz. +Specify this when you want to do .B "pbuilder --update" - with a different distribution target set up. +with a different distribution target set up. -.B "--distribution, " "--mirror, " "--othermirror" - options are only valid when +.B "--distribution", "--components", "--mirror", "--othermirror" +options are only valid when .B "\-\-override\-config" -option is specified in +option is specified in .B "--update" target, or when .B "pbuilder --create" @@ -18,6 +18,8 @@ BUILDRESULT=/var/cache/pbuilder/result/ # specifying the distribution forces the distribution on "pbuilder update" #DISTRIBUTION=lenny +# specifying the components of the distribution (default is "main") +#COMPONENTS="main contrib non-free" #specify the cache for APT APTCACHE="/var/cache/pbuilder/aptcache/" APTCACHEHARDLINK="yes" diff --git a/pbuilderrc.5 b/pbuilderrc.5 index 9972f64..3fb925a 100644 --- a/pbuilderrc.5 +++ b/pbuilderrc.5 @@ -95,6 +95,17 @@ is specified for option. .TP +.BI "COMPONENTS=" "main" +Specify the default distribution components to use. +This option only affects when doing +.B "pbuilder create" +or when +.B "--override-config" +is specified for +.B "pbuilder update" +option. + +.TP .BI "export http_proxy=" "http://your-proxy:8080/" Defines the proxy for http connection. |