+2007-10-08 Frank Lichtenheld <djpig@debian.org>,
+ Guillem Jover <guillem@debian.org>
+
+ * scripts/controllib.pl (debarch_is): Check if $alias is equal to
+ $real or 'any' before mapping them to debtriplets.
+ (debarch_to_debtriplet): Do not special case 'any' nor 'all'.
+ (debarch_eq): Check if $a and $b are equal before mapping them to
+ debtriplets.
+
2007-10-07 Guillem Jover <guillem@debian.org>
* scripts/dpkg-buildpackage.pl: Warn if run as root and $rootcommand
instead of unconditionally setting it to 'Installed'. Closes: #432893
Thanks to Brian M. Carlson.
* Add Vcs-Browser and Vcs-Git fields to debian/control.
+ * Allow comparing unsupported architectures for equality and identity.
+ Based on a patch by Frank Lichtenheld. Closes: #427210
[ Frank Lichtenheld ]
* Add _MTN to dpkg-source -i default regex. Suggested by Jari Aalto.
local ($_) = @_;
my $arch;
- # FIXME: 'any' is handled here, to be able to do debarch_eq('any', foo).
- if (/^any$/ || /^all$/) {
- return ($_, $_, $_);
- } elsif (/^linux-([^-]*)/) {
+ if (/^linux-([^-]*)/) {
# XXX: Might disappear in the future, not sure yet.
$arch = $1;
} else {
sub debarch_eq($$)
{
my ($a, $b) = @_;
+
+ return 1 if ($a eq $b);
+
my @a = debarch_to_debtriplet($a);
my @b = debarch_to_debtriplet($b);
sub debarch_is($$)
{
my ($real, $alias) = @_;
+
+ return 1 if ($alias eq $real or $alias eq 'any');
+
my @real = debarch_to_debtriplet($real);
my @alias = debwildcard_to_debtriplet($alias);