[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.0-rc1-5-g0c00f40



The following commit has been merged in the master branch:
commit 0c00f4075799e3b572480401016de413a07ee862
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Mar 11 18:11:03 2011 +0100

    Added multi-arch field and a check for its values

diff --git a/checks/fields b/checks/fields
index aba3aab..9c058ad 100644
--- a/checks/fields
+++ b/checks/fields
@@ -78,7 +78,7 @@ our %KNOWN_BINARY_FIELDS = map { $_ => 1 }
      'recommends', 'suggests', 'enhances', 'conflicts', 'provides',
      'replaces', 'breaks', 'essential', 'maintainer', 'section', 'priority',
      'source', 'description', 'installed-size', 'python-version', 'homepage',
-     'bugs', 'origin');
+     'bugs', 'origin', 'multi-arch');
 
 # The Ubuntu original-maintainer field is handled separately.
 our %KNOWN_UDEB_FIELDS = map { $_ => 1 }
@@ -288,6 +288,15 @@ if (not defined $info->field('version')) {
 	}
 }
 
+#---- Multi-Arch
+
+if (defined $info->field('multi-arch')){
+    my $march = $info->field('multi-arch');
+    unfold('multi-arch', \$march);
+    tag 'unknown-multi-arch-value', $pkg, $march
+	unless $march =~ m/^no|foreign|allowed|same$/o;
+}
+
 #---- Architecture
 
 if (not defined $info->field('architecture')) {
diff --git a/checks/fields.desc b/checks/fields.desc
index 4bb8ec4..ded3a3f 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -115,6 +115,12 @@ Info: Architecture wildcards, including the special architecture value
  either be architecture-independent or built for a specific architecture.
 Ref: policy 5.6.8
 
+Tag: unknown-multi-arch-value
+Severity: serious
+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: aspell-package-not-arch-all
 Severity: normal
 Certainty: certain
@@ -1024,7 +1030,7 @@ Info: The package appear to be a Java library and depending on one
  longer mandates that Java libraries depend on Java Runtimes.
  .
  If the library package ships executables along with the library,
- then please consider making this an application package or mvoe the
+ then please consider making this an application package or move the
  binaries to a (new) application package.
  .
  If there is otherwise a valid reason for this dependency, please override
diff --git a/debian/changelog b/debian/changelog
index f788cce..5a77df8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
 lintian (2.5.0~rc2) UNRELEASED; urgency=low
 
+  * Summary of tag changes:
+    + Added:
+      - unknown-multi-arch-value
+
   * checks/binaries:
     + [ADB] Update binary-from-other-architecture's tests in line with the
       changes to filename output introduced in 2.5.0~rc1.
@@ -10,7 +14,9 @@ lintian (2.5.0~rc2) UNRELEASED; urgency=low
   * checks/deb-format:
     + [NT] Removed assumption that there was always a changelog in a binary
       with a data.tar.lzma member.
-  * checks/huge-usr-share:
+  * checks/fields:
+    + [NT] Recognise Multi-Arch as a known binary field.  (Closes: #617816)
+    * checks/huge-usr-share:
     + [NT] Removed assumption that there is always files in usr/share.
 
   * data/changelog-file/ubuntu-dists:
diff --git a/t/tests/basic-3.0-native/debian/README b/t/tests/fields-multi-arch/debian/README
similarity index 100%
copy from t/tests/basic-3.0-native/debian/README
copy to t/tests/fields-multi-arch/debian/README
diff --git a/t/tests/files-python-general/debian/debian/control.in b/t/tests/fields-multi-arch/debian/debian/control.in
similarity index 71%
copy from t/tests/files-python-general/debian/debian/control.in
copy to t/tests/fields-multi-arch/debian/debian/control.in
index 8513ca9..2635b44 100644
--- a/t/tests/files-python-general/debian/debian/control.in
+++ b/t/tests/fields-multi-arch/debian/debian/control.in
@@ -1,30 +1,31 @@
 Source: {$srcpkg}
 Priority: extra
-Section: python
+Section: devel
 Maintainer: {$author}
 Standards-Version: {$standards_version}
 Build-Depends: debhelper (>= 7.0.50~)
 
-Package: python-kinterbasdb
+Package: {$srcpkg}-some
 Architecture: any
 Depends: $\{misc:Depends\}, $\{shlibs:Depends\}
+Multi-Arch: bad
 Description: {$description}
  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
  be an empty package.
+ .
+ This is a test with an invalid Multi-Arch field.
 
-Package: python-kinterbasdb-dbg
+Package: {$srcpkg}-same
 Architecture: any
-Section: debug
-Depends: $\{misc:Depends\}, python-kinterbasdb (= $\{binary:Version\}),
- $\{shlibs:Depends\}
-Description: {$description} - debug
+Depends: $\{misc:Depends\}, $\{shlibs:Depends\}
+Multi-Arch: same
+Description: {$description} - same
  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
  be an empty package.
  .
- This is a fake debug package.
-
+ This is a test with a valid Multi-Arch field.
 
diff --git a/t/tests/fields-multi-arch/desc b/t/tests/fields-multi-arch/desc
new file mode 100644
index 0000000..0be0fd2
--- /dev/null
+++ b/t/tests/fields-multi-arch/desc
@@ -0,0 +1,5 @@
+Testname: fields-multi-arch
+Sequence: 6000
+Version: 1.0
+Description: Tests for the Multi-Arch field
+Test-For: unknown-multi-arch-value
diff --git a/t/tests/fields-multi-arch/tags b/t/tests/fields-multi-arch/tags
new file mode 100644
index 0000000..873bd92
--- /dev/null
+++ b/t/tests/fields-multi-arch/tags
@@ -0,0 +1 @@
+E: fields-multi-arch-some: unknown-multi-arch-value fields-multi-arch-some bad

-- 
Debian package checker


Reply to: