From bffe7197037295f4f5a8c5a28adba5aeca3b875c Mon Sep 17 00:00:00 2001 From: Emmet Hikory Date: Wed, 3 Feb 2010 14:38:27 -0800 Subject: [PATCH] Fix bugs in architecture-switching --- debian/changelog | 1 + doc/pbuilder-dist.1 | 12 +++++++----- pbuilder-dist | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5a593cd..32bd743 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ ubuntu-dev-tools (0.92) UNRELEASED; urgency=low * mk-sbuild-lv: support foreign armel schroots * mk-sbuild-lv: use --arch=foo rather than --arch foo for debootstrap * pbuilder-dist: Allow architecture-switching to armel on i386/amd64 + * docs/pbuilder-dist.1: Document architecture-switching for armel * debian/control: add qemu-arm-static to Recommends: [ Michael Bienia ] diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 index eb50242..bd26064 100644 --- a/doc/pbuilder-dist.1 +++ b/doc/pbuilder-dist.1 @@ -4,10 +4,10 @@ pbuilder\-dist, cowbuilder\-dist \- multi-distribution pbuilder/cowbuilder wrapper .SH SYNOPSIS -\fBpbuilder\-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP] [\fBmainonly\fP] +\fBpbuilder\-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP|\fBarmel\fP] [\fBmainonly\fP] \fIoperation\fR [\fI...\fR] -\fBcowbuilder\-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP] [\fBmainonly\fP] +\fBcowbuilder\-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP|\fBarmel\fP] [\fBmainonly\fP] \fIoperation\fR [\fI...\fR] .SH DESCRIPTION @@ -33,10 +33,12 @@ the name also contains \-\fIarchitecture\fR. \fBdistribution\fP Replace this with the codename of the version of Ubuntu or Debian you want to use. .TP -\fBi386\fP / \fBamd64\fP -Only available on amd64 systems. -This is optional; default is \fBamd64\fP. +\fBi386\fP / \fBamd64\fP / \fBarmel\fP +Only available on i386 and amd64 systems. +This is optional; default is the native architecture If \fBi386\fP is specified, an i386 environment will be used. +If \fBarmel\fP is specified, an armel environment will be used. +Note that there is no support for amd64 chroots on i386 systems .TP \fBmainonly\fP If you specify \fBmainonly\fP, only packages from the main (in Debian) or diff --git a/pbuilder-dist b/pbuilder-dist index a7a8bca..78b350d 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -306,7 +306,7 @@ def main(): if len(parts) > 2: requested_arch = parts[2] - elif len(args) > 0 and args[0] in ('i386', 'amd64'): + elif len(args) > 0 and args[0] in ('i386', 'amd64', 'armel'): requested_arch = args.pop(0) else: requested_arch = None @@ -316,6 +316,7 @@ def main(): app.build_architecture = requested_arch else if requested_arch == 'armel' and app.system_architecture in ('i386', 'amd64'): app.build_architecture = requested_arch + args.append('--debootstrap=build-arm-chroot') else: print 'Error: Architecture switching is not supported on your system; wrong filename.' sys.exit(1)