Commit 0241394d authored by Loïc Minier's avatar Loïc Minier

pbuilder: Add --architecture and ARCHITECTURE flag

pbuilder: add support for setting the architecture on the command-line
and in pbuilderrc.
parent 0e063b11
......@@ -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
......
......@@ -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
......
......@@ -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]
......
......@@ -188,6 +188,14 @@ you may use:
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".
......
......@@ -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"
......
......@@ -94,6 +94,12 @@ is specified for
.B "pbuilder update"
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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment