[SCM] Debian package checker branch, master, updated. 2.5.0-33-g4720aa0
The following commit has been merged in the master branch:
commit 4720aa04401c0e5bbb375c9896ef16196c6a3c48
Author: Niels Thykier <niels@thykier.net>
Date: Sat Jun 4 23:22:06 2011 +0200
Added check for illegal multi-arch values
diff --git a/checks/fields b/checks/fields
index 290b643..4435f66 100644
--- a/checks/fields
+++ b/checks/fields
@@ -295,6 +295,13 @@ if (defined $info->field('multi-arch')){
unfold('multi-arch', \$march);
tag 'unknown-multi-arch-value', $pkg, $march
unless $march =~ m/^no|foreign|allowed|same$/o;
+ if ($march eq 'same' && $type eq 'binary' &&
+ defined $info->field('architecture')){
+ my $arch = $info->field('architecture');
+ # Do not use unfold to avoid duplicate warning
+ $arch =~ s/\n//o;
+ tag 'illegal-multi-arch-value', $arch, $march if ($arch eq 'all');
+ }
}
#---- Architecture
diff --git a/checks/fields.desc b/checks/fields.desc
index fa187bf..964d0bb 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -122,6 +122,14 @@ Certainty: certain
Info: The package has an unknown value in its Multi-Arch field. The
value must be one of "no", "same", "foreign" or "allowed".
+Tag: illegal-multi-arch-value
+Severity: serious
+Certainty: certain
+Info: The package is architecture all and has the Multi-Arch same value.
+ .
+ This combination is not allowed by the Multi-Arch specification.
+Ref: https://wiki.ubuntu.com/MultiarchSpec
+
Tag: aspell-package-not-arch-all
Severity: normal
Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index 297e82c..619eb29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ lintian (2.5.1) UNRELEASED; urgency=low
- dh_pycentral-is-obsolete
- dh_python-is-obsolete
- non-empty-dependency_libs-in-la-file
+ - illegal-multi-arch-value
+ Removed:
- uses-dh-python-with-no-pycompat
@@ -14,6 +15,7 @@ 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)
+ + [NT] Added illegal-multi-arch-value. (Closes: #616493)
* checks/files:
+ [NT] Fixed two misnamed udeb tags, which lead to an internal
error if triggered. Thanks to Guillem Jover for the report.
diff --git a/t/debs/fields-multi-arch-illegal/Makefile b/t/debs/fields-multi-arch-illegal/Makefile
new file mode 100644
index 0000000..787ed5d
--- /dev/null
+++ b/t/debs/fields-multi-arch-illegal/Makefile
@@ -0,0 +1,16 @@
+all:
+ echo '2.0' > debian-binary
+ mkdir -p usr/share/doc/fields-multi-arch-illegal
+ cp copyright changelog usr/share/doc/fields-multi-arch-illegal
+ gzip -9 usr/share/doc/fields-multi-arch-illegal/changelog
+ tar czf data.tar.gz usr
+ chown 0:0 control
+ chmod 644 control
+ md5sum usr/share/doc/fields-multi-arch-illegal/* > md5sums
+ tar cfz control.tar.gz control md5sums
+ ar rc fields-multi-arch-illegal.deb \
+ debian-binary control.tar.gz data.tar.gz
+
+clean:
+ rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary
+ rm -rf usr
diff --git a/t/debs/deb-format-record-size/changelog b/t/debs/fields-multi-arch-illegal/changelog
similarity index 68%
copy from t/debs/deb-format-record-size/changelog
copy to t/debs/fields-multi-arch-illegal/changelog
index b28456d..31ae166 100644
--- a/t/debs/deb-format-record-size/changelog
+++ b/t/debs/fields-multi-arch-illegal/changelog
@@ -1,4 +1,4 @@
-deb-format-record-size (1.0) unstable; urgency=low
+fields-multi-arch-illegal (1.0) unstable; urgency=low
* A Lintian test case.
diff --git a/t/debs/deb-format-record-size/control b/t/debs/fields-multi-arch-illegal/control
similarity index 76%
copy from t/debs/deb-format-record-size/control
copy to t/debs/fields-multi-arch-illegal/control
index 7163fe9..6731e1f 100644
--- a/t/debs/deb-format-record-size/control
+++ b/t/debs/fields-multi-arch-illegal/control
@@ -1,10 +1,11 @@
-Package: deb-format-record-size
+Package: fields-multi-arch-illegal
Version: 1.0
Architecture: all
+Multi-arch: same
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Section: devel
Priority: extra
-Description: Test package with a non-standard tar record size
+Description: Test package with illegal Multi-arch value
This is a test package designed to exercise some feature or tag of
Lintian. It is part of the Lintian test suite and may do very odd
things. It should not be installed like a regular package. It may
diff --git a/t/debs/control-field-traversal-4/copyright b/t/debs/fields-multi-arch-illegal/copyright
similarity index 100%
copy from t/debs/control-field-traversal-4/copyright
copy to t/debs/fields-multi-arch-illegal/copyright
diff --git a/t/debs/fields-multi-arch-illegal/tags b/t/debs/fields-multi-arch-illegal/tags
new file mode 100644
index 0000000..4ee667c
--- /dev/null
+++ b/t/debs/fields-multi-arch-illegal/tags
@@ -0,0 +1 @@
+E: fields-multi-arch-illegal: illegal-multi-arch-value all same
--
Debian package checker
Reply to: