Fix bugs in architecture-switching

This commit is contained in:
Emmet Hikory 2010-02-03 14:38:27 -08:00
parent 5120e41e6a
commit bffe719703
3 changed files with 10 additions and 6 deletions

1
debian/changelog vendored
View File

@ -8,6 +8,7 @@ ubuntu-dev-tools (0.92) UNRELEASED; urgency=low
* mk-sbuild-lv: support foreign armel schroots * mk-sbuild-lv: support foreign armel schroots
* mk-sbuild-lv: use --arch=foo rather than --arch foo for debootstrap * mk-sbuild-lv: use --arch=foo rather than --arch foo for debootstrap
* pbuilder-dist: Allow architecture-switching to armel on i386/amd64 * 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: * debian/control: add qemu-arm-static to Recommends:
[ Michael Bienia ] [ Michael Bienia ]

View File

@ -4,10 +4,10 @@
pbuilder\-dist, cowbuilder\-dist \- multi-distribution pbuilder/cowbuilder wrapper pbuilder\-dist, cowbuilder\-dist \- multi-distribution pbuilder/cowbuilder wrapper
.SH SYNOPSIS .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] \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] \fIoperation\fR [\fI...\fR]
.SH DESCRIPTION .SH DESCRIPTION
@ -33,10 +33,12 @@ the name also contains \-\fIarchitecture\fR.
\fBdistribution\fP \fBdistribution\fP
Replace this with the codename of the version of Ubuntu or Debian you want to use. Replace this with the codename of the version of Ubuntu or Debian you want to use.
.TP .TP
\fBi386\fP / \fBamd64\fP \fBi386\fP / \fBamd64\fP / \fBarmel\fP
Only available on amd64 systems. Only available on i386 and amd64 systems.
This is optional; default is \fBamd64\fP. This is optional; default is the native architecture
If \fBi386\fP is specified, an i386 environment will be used. 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 .TP
\fBmainonly\fP \fBmainonly\fP
If you specify \fBmainonly\fP, only packages from the main (in Debian) or If you specify \fBmainonly\fP, only packages from the main (in Debian) or

View File

@ -306,7 +306,7 @@ def main():
if len(parts) > 2: if len(parts) > 2:
requested_arch = 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) requested_arch = args.pop(0)
else: else:
requested_arch = None requested_arch = None
@ -316,6 +316,7 @@ def main():
app.build_architecture = requested_arch app.build_architecture = requested_arch
else if requested_arch == 'armel' and app.system_architecture in ('i386', 'amd64'): else if requested_arch == 'armel' and app.system_architecture in ('i386', 'amd64'):
app.build_architecture = requested_arch app.build_architecture = requested_arch
args.append('--debootstrap=build-arm-chroot')
else: else:
print 'Error: Architecture switching is not supported on your system; wrong filename.' print 'Error: Architecture switching is not supported on your system; wrong filename.'
sys.exit(1) sys.exit(1)