Hi,
I've been using dpkg debs with this patch for some time and the only
problem until now has been a stupid error left when I switched from
expanding the aliases via dpkg-architecture to an internal function.
The function was returning a list and split was expecting a scalar.
Fixed in this incremental patch, and included as well initial updated
text for the man page, although this should be reviewed by a native
English speaker. :)
To test that the new patch fixes the problem, "dpkg-source -b" can be
tried with qemu or pistachio, otherwise they'll produce a .dsc file
with an "Architecture: 1" field.
regards,
guillem
diff -Naur man/C/dpkg-architecture.1 man/C/dpkg-architecture.1
--- man/C/dpkg-architecture.1 2005-06-14 16:17:18.000000000 +0300
+++ man/C/dpkg-architecture.1 2005-08-03 06:02:40.000000000 +0300
@@ -11,8 +11,8 @@
\&\fB\-f\fR
.PP
Valid actions:
-\&\fB\-l\fR, \fB\-q\fRVariable\-Name, \fB\-s\fR, \fB\-u\fR, \fB\-c\fR Command,
-\fB\-L\fR
+\&\fB\-l\fR, \fB\-e\fRDebian\-Architecture, \fB\-i\fRArchitecture\-Alias,
+\fB\-q\fRVariable\-Name, \fB\-s\fR, \fB\-u\fR, \fB\-c\fR Command, \fB\-L\fR
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
dpkg-architecture does provide a facility to determine and set the build and
@@ -30,8 +30,12 @@
will warn you if your choice doesn't match the default.
.PP
The default action is \fB\-l\fR, which prints the environment variables, one
each line,
-in the format VARIABLE=value. If you are only interested in the value of a
-single variable, you can use \fB\-q\fR. If you specify \fB\-s\fR, it will
output an export
+in the format VARIABLE=value. If you want to check for equality between two
+Debian Architectures, you can use \fB\-e\fR, by default it will compare against
+the currect Denian Architecture, being it the host. If you want to check for
+identity of the current Debian Architecture against an Architecture Alias, you
+can use \fB\-i\fR. If you are only interested in the value of a single
variable,
+you can use \fB\-q\fR. If you specify \fB\-s\fR, it will output an export
command. This can be used to set the environment variables using eval.
\fB\-u\fR
does return a similar command to unset all variables. \fB\-c\fR does execute a
command in an environment which has all variables set to the determined
@@ -55,6 +59,11 @@
.IX Item "Debian Architecture"
The Debian archietcture string, which specifies the binary tree in the
\s-1FTP\s0
archive. Examples: i386, sparc, hurd\-i386.
+.IP "Architecture Alias" 4
+.IX Item "Architecture Alias"
+An architecture alias is a wildcard architecture that will match any real
+architecture being part of it. The general form is <kernel>\-<cpu>.
+Examples: linux\-any, linux\-alpha, any\-i386, hurd\-any.
.IP "\s-1GNU\s0 System Type" 4
.IX Item "GNU System Type"
An architecture specification string consisting of two parts,
diff -Naur scripts/dpkg-source.pl scripts/dpkg-source.pl
--- scripts/dpkg-source.pl 2005-08-03 04:39:30.000000000 +0300
+++ scripts/dpkg-source.pl 2005-08-03 04:37:09.000000000 +0300
@@ -173,7 +173,7 @@
if (grep($sourcearch[0] eq $_, 'any','all')) {
@sourcearch= ('any');
} else {
- my @arches = map(split(/\s+/, debian_arch_expand($_)),
+ my @arches = map(debian_arch_expand($_),
split(/\s+/, $v));
chomp @arches;
for $a (@arches) {