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

[SCM] Debian package checker branch, master, updated. 2.5.4-51-g15dc43a



The following commit has been merged in the master branch:
commit 15dc43a8d57eec9eae0b4b959c0c4dfb007cfd80
Author: Jakub Wilk <jwilk@debian.org>
Date:   Wed Dec 21 17:11:02 2011 +0100

    Check for incomplete Multi-arch'ification
    
    Acked-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/group-checks b/checks/group-checks
index ccf6d3b..1375db5 100644
--- a/checks/group-checks
+++ b/checks/group-checks
@@ -60,6 +60,7 @@ foreach my $proc (@procs) {
         push @nodes, $pname;
         $edges{$pname} = [map { $_->pkg_name } @$deps];
         _check_priorities ($proc, $deps);
+        _check_multiarch ($proc, $deps);
     }
 }
 
@@ -144,6 +145,21 @@ sub _overlap_check {
     }
 }
 
+sub _check_multiarch {
+    my ($proc, $deps) = @_;
+    my $ma = $proc->info->field('multi-arch') // 'no';
+    if ($ma eq 'same') {
+        foreach my $dep (@$deps) {
+            my $dma = $dep->info->field('multi-arch') // 'no';
+            if ($dma eq 'same' or $dma eq 'foreign') {
+                1; # OK
+            } else {
+                tag 'dependency-is-not-multi-archified', $proc->pkg_name . " depends on " . $dep->pkg_name . " (multi-arch: $dma)";
+            }
+        }
+    }
+}
+
 ## Encapsulate Tarjan's algorithm in an class/object to keep
 ## the run sub somewhat sane.
 package Lintian::group_checks::Graph;
diff --git a/checks/group-checks.desc b/checks/group-checks.desc
index 4f71c6b..5975dbd 100644
--- a/checks/group-checks.desc
+++ b/checks/group-checks.desc
@@ -44,3 +44,10 @@ Info: The binaries appears to have overlapping files without proper
  Note the check is completely based on the file index for the
  packages.  Possible known false-positives include dpkg-diverts in
  maintainer scripts.
+
+Tag: dependency-is-not-multi-archified
+Severity: normal
+Certainty: possible
+Info: The package is Multi-Arch "same", but it depends on a package that
+ is neither Multi-Arch "same" nor "foreign".
+Ref: https://wiki.ubuntu.com/MultiarchSpec
diff --git a/debian/changelog b/debian/changelog
index 227ae18..dd99493 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ lintian (2.5.5) UNRELEASED; urgency=low
 
   * Summary of tag changes:
     + Added:
+      - dependency-is-not-multi-archified
       - preinst-uses-dpkg-maintscript-helper-without-predepends
     + Removed:
       - uploader-address-missing
@@ -35,6 +36,8 @@ lintian (2.5.5) UNRELEASED; urgency=low
   * checks/group-check{,.desc}:
     + [NT] Check for file conflicts in binaries built from the same
       source package.  (Closes: #293838)
+    + [JW] Added check for incomplete Multi-arch'ification.
+      (Closes: #650838)
   * checks/nmu:
     + [JW] Properly handle uploader names with commas.
   * checks/scripts:
diff --git a/t/tests/group-checks-multi-arch/debian/Makefile b/t/tests/group-checks-multi-arch/debian/Makefile
new file mode 100644
index 0000000..a42c197
--- /dev/null
+++ b/t/tests/group-checks-multi-arch/debian/Makefile
@@ -0,0 +1,8 @@
+DATAFILE=data-$(shell dpkg -qDEB_HOST_ARCH)
+
+all:
+	echo $(DATAFILE) > $(DATAFILE)
+
+install:
+	install -d $(DESTDIR)/usr/lib/pkg-same/
+	install -m 0644 $(DATAFILE) $(DESTDIR)/usr/lib/pkg-same/$(DATAFILE)
diff --git a/t/tests/group-checks-wrong-priorities/debian/debian/control.in b/t/tests/group-checks-multi-arch/debian/debian/control.in
similarity index 69%
copy from t/tests/group-checks-wrong-priorities/debian/debian/control.in
copy to t/tests/group-checks-multi-arch/debian/debian/control.in
index ce480e7..763e4c0 100644
--- a/t/tests/group-checks-wrong-priorities/debian/debian/control.in
+++ b/t/tests/group-checks-multi-arch/debian/debian/control.in
@@ -5,23 +5,23 @@ Maintainer: {$author}
 Standards-Version: {$standards_version}
 Build-Depends: debhelper (>= 7.0.50~)
 
-Package: pkg-optional
+Package: pkg-foreign
 Architecture: all
-Priority: optional
-Depends: $\{misc:Depends\}, pkg-extra
-Description: {$description} - pkg-optional
+Depends: $\{misc:Depends\}
+Description: {$description} - pkg-foreign
  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.
  .
- optional.
+ Should have been Multi-arch foreign package.
 
-Package: pkg-extra
-Architecture: all
-Depends: $\{misc:Depends\}
-Description: {$description} - pkg-extra
+Package: pkg-same
+Architecture: any
+Depends: $\{misc:Depends\}, pkg-foreign
+Multi-Arch: same
+Description: {$description} - pkg-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.
  .
- extra.
+ Multi-arch same package.
diff --git a/t/tests/group-checks-multi-arch/debian/debian/pkg-foreign.docs b/t/tests/group-checks-multi-arch/debian/debian/pkg-foreign.docs
new file mode 100644
index 0000000..ff0f331
--- /dev/null
+++ b/t/tests/group-checks-multi-arch/debian/debian/pkg-foreign.docs
@@ -0,0 +1 @@
+some-doc.txt
diff --git a/t/tests/group-checks-multi-arch/debian/debian/pkg-same.install b/t/tests/group-checks-multi-arch/debian/debian/pkg-same.install
new file mode 100644
index 0000000..a1157c9
--- /dev/null
+++ b/t/tests/group-checks-multi-arch/debian/debian/pkg-same.install
@@ -0,0 +1,2 @@
+usr/lib/pkg-same/
+
diff --git a/t/tests/group-checks-circular-deps/debian/some-doc.txt b/t/tests/group-checks-multi-arch/debian/some-doc.txt
similarity index 100%
copy from t/tests/group-checks-circular-deps/debian/some-doc.txt
copy to t/tests/group-checks-multi-arch/debian/some-doc.txt
diff --git a/t/tests/group-checks-multi-arch/desc b/t/tests/group-checks-multi-arch/desc
new file mode 100644
index 0000000..1d9be20
--- /dev/null
+++ b/t/tests/group-checks-multi-arch/desc
@@ -0,0 +1,5 @@
+Testname: group-checks-multi-arch
+Sequence: 6000
+Version: 1.0
+Description: Test for multi-arch issues
+Test-For: dependency-is-not-multi-archified
diff --git a/t/tests/group-checks-multi-arch/tags b/t/tests/group-checks-multi-arch/tags
new file mode 100644
index 0000000..6e12e3f
--- /dev/null
+++ b/t/tests/group-checks-multi-arch/tags
@@ -0,0 +1 @@
+W: group-checks-multi-arch source: dependency-is-not-multi-archified pkg-same depends on pkg-foreign (multi-arch: no)

-- 
Debian package checker


Reply to: