[SCM] Debian package checker branch, master, updated. 2.5.0-12-gadc6555
The following commit has been merged in the master branch:
commit adc65556903f64d46b5ae998e6ec57c12ea3db03
Author: Niels Thykier <niels@thykier.net>
Date: Tue May 24 11:16:51 2011 +0200
Allow "any" and "all" to appear together in dsc files
diff --git a/checks/fields b/checks/fields
index 6e51c9b..290b643 100644
--- a/checks/fields
+++ b/checks/fields
@@ -303,15 +303,22 @@ if (not defined $info->field('architecture')) {
tag 'no-architecture-field';
} else {
my $archs = $info->field('architecture');
-
unfold('architecture', \$archs);
- my @archs = split / /, $archs;
-
- if (@archs > 1 && grep { $_ eq 'any' || ($type ne 'source' && $_ eq 'all') } @archs) {
- tag 'magic-arch-in-arch-list';
+ my @archs = split m/ /o, $archs;
+ if (@archs > 1) { # Check for magic architecture combinations.
+ my %archmap;
+ my $magic = 0;
+ $archmap{$_}++ for (@archs);
+ $magic++ if ($type ne 'source' && $archmap{'all'});
+ if ($archmap{'any'}){
+ delete $archmap{'any'};
+ # Allow 'all' to be present in source packages as well (#626775)
+ delete $archmap{'all'} if $type eq 'source';
+ $magic++ if %archmap;
+ }
+ tag 'magic-arch-in-arch-list' if $magic;
}
-
for my $arch (@archs) {
tag 'unknown-architecture', $arch
unless $KNOWN_ARCHS->known($arch) || $ARCH_WILDCARDS{$arch};
diff --git a/checks/fields.desc b/checks/fields.desc
index 6000152..fa187bf 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -86,10 +86,11 @@ Ref: policy 5.3
Tag: magic-arch-in-arch-list
Severity: serious
Certainty: certain
-Info: The special architecture value "any" only make sense if it occurs
- alone. The value "all" may appear together with other architectures
- in a *.dsc file but must occur alone if used in a binary package.
-Ref: policy 5.6.8
+Info: The special architecture value "any" only makes sense if it occurs
+ alone or (in a *.dsc file) together with "all". The value "all" may
+ appear together with other architectures in a *.dsc file but must
+ occur alone if used in a binary package.
+Ref: policy 5.6.8, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626775
Tag: unknown-architecture
Severity: normal
diff --git a/debian/changelog b/debian/changelog
index 603281e..459ae78 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
lintian (2.5.1) UNRELEASED; urgency=low
+ * checks/fields{,.desc}:
+ + [NT] Allow "all" and "any" to appear together in the Architecture
+ field of a .dsc file. (Closes: #626775)
* checks/java:
+ [NT] Sort the jar files by name, so they are checked in the same
order.
--
Debian package checker
Reply to: