aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2009-12-30 12:18:40 +0100
committerLoïc Minier <lool@dooz.org>2009-12-30 17:41:10 +0100
commit0241394dc3fa432739bb4241da2b58a0d80dacbe (patch)
tree5786b2e9974b2532c220953f23b73ac70f866d9a
parent0e063b11822610435acc53577b48fb67375b5a9e (diff)
downloadpbuilder-0241394dc3fa432739bb4241da2b58a0d80dacbe.tar
pbuilder-0241394dc3fa432739bb4241da2b58a0d80dacbe.tar.gz
pbuilder: Add --architecture and ARCHITECTURE flag
pbuilder: add support for setting the architecture on the command-line and in pbuilderrc.
-rwxr-xr-xpbuilder-checkparams4
-rwxr-xr-xpbuilder-createbuildenv2
-rw-r--r--pbuilder-modules1
-rw-r--r--pbuilder.88
-rwxr-xr-xpbuilderrc3
-rw-r--r--pbuilderrc.56
6 files changed, 23 insertions, 1 deletions
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index 6debb03..c538b3c 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -82,6 +82,10 @@ while [ -n "$1" ]; do
OVERRIDE_APTLINES_WARN=yes
shift; shift;
;;
+ --architecture)
+ ARCHITECTURE="$2";
+ shift; shift;
+ ;;
--components)
COMPONENTS="$2";
OVERRIDE_APTLINES_WARN=yes
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index 864e0a5..cf3eaaf 100755
--- a/pbuilder-createbuildenv
+++ b/pbuilder-createbuildenv
@@ -62,7 +62,7 @@ else
exit 1
fi
-if ! ( cd "$BUILDPLACE" && "${DEBOOTSTRAP}" "${DEBOOTSTRAPOPTS[@]}" "$DISTRIBUTION" . "$MIRRORSITE" $DEBOOTSTRAPSCRIPT ) ; then
+if ! ( cd "$BUILDPLACE" && "${DEBOOTSTRAP}" ${ARCHITECTURE:+--arch=$ARCHITECTURE} "${DEBOOTSTRAPOPTS[@]}" "$DISTRIBUTION" . "$MIRRORSITE" $DEBOOTSTRAPSCRIPT ) ; then
log "E: $DEBOOTSTRAP failed"
exit 1
fi
diff --git a/pbuilder-modules b/pbuilder-modules
index 8a3f21e..bb57d7e 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|experimental|...)]
+ --architecture [architecture]
--components [components]
--buildresult [location-to-copy-build-result]
--aptcache [location of retrieved package files]
diff --git a/pbuilder.8 b/pbuilder.8
index d4a7c21..d24d424 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -189,6 +189,14 @@ or
.B "experimental".
.TP
+.BI "\-\-architecture [" "architecture" "]"
+Specifies the architecture used. The supported values are the ones debootstrap
+supports.
+.B "i386"
+or
+.B "amd64".
+
+.TP
.BI "\-\-components [" "components" "]"
Specifies the default distribution components to use. eg. "main contrib non-free".
Default is "main".
diff --git a/pbuilderrc b/pbuilderrc
index 31f8f4c..4aa952f 100755
--- a/pbuilderrc
+++ b/pbuilderrc
@@ -15,6 +15,9 @@ BUILDRESULT=/var/cache/pbuilder/result/
# specifying the distribution forces the distribution on "pbuilder update"
#DISTRIBUTION=sid
+# specifying the architecture passes --arch= to debootstrap; the default is
+# to use the architecture of the host
+#ARCHITECTURE=`dpkg --print-architecture`
# specifying the components of the distribution, for instance to enable all
# components on Debian use "main contrib non-free" and on Ubuntu "main
# restricted universe multiverse"
diff --git a/pbuilderrc.5 b/pbuilderrc.5
index 600d33c..881e91a 100644
--- a/pbuilderrc.5
+++ b/pbuilderrc.5
@@ -95,6 +95,12 @@ is specified for
option.
.TP
+.BI "ARCHITECTURE=" "`dpkg --print-architecture`"
+Specify the default distribution to use.
+This option only affects when doing
+.B "pbuilder create"
+
+.TP
.BI "COMPONENTS=" "main"
Specify the default distribution components to use.
This option is space-delimited.