Package: dpkg
Version: 1.14.25
Severity: wishlist
Tags: patch
Hi,
this patch adds an exception to dpkg-architecture that allows architecture
names that start with "x-" as long as a GNU architecture name is also
specified.
This is incredibly useful if one wants to define local architectures for
cross-compiling (using both -a and -t to dpkg-buildpackage works).
The downside is that DEB_HOST_ARCH_OS and DEB_HOST_ARCH_CPU cannot be
automatically set to sane values, which I think is a limitation one can
live with.
Simon
-- System Information:
Debian Release: 5.0.2
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages dpkg depends on:
ii coreutils 6.10-6 The GNU core utilities
ii libc6 2.7-18 GNU C Library: Shared libraries
ii lzma 4.43-14 Compression method of 7z format in
dpkg recommends no packages.
Versions of packages dpkg suggests:
ii apt 0.7.20.2+lenny1 Advanced front-end for dpkg
-- no debconf information
--- /usr/bin/dpkg-architecture.orig 2009-07-19 19:03:35.000000000 +0200
+++ /usr/bin/dpkg-architecture 2009-07-19 19:11:14.000000000 +0200
@@ -152,7 +152,7 @@
unless defined $req_host_arch;
}
-if ($req_host_gnu_type ne '' && $req_host_arch ne '') {
+if ($req_host_gnu_type ne '' && $req_host_arch ne '' && !($req_host_arch =~
/^x-/)) {
my $dfl_host_gnu_type = debarch_to_gnutriplet($req_host_arch);
die (sprintf(_g("unknown default GNU system type for Debian architecture
%s"),
$req_host_arch))
@@ -187,7 +187,11 @@
if ($action eq 'l') {
foreach my $k (@ordered) {
- print "$k=$v{$k}\n";
+ if (defined $v{$k}) {
+ print "$k=$v{$k}\n";
+ } else {
+ print "$k=unknown\n";
+ }
}
} elsif ($action eq 's') {
foreach my $k (@ordered) {