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

lintian: r1385 - in trunk: checks debian testset testset/relations/debian



Author: djpig
Date: 2008-06-17 00:56:55 +0200 (Tue, 17 Jun 2008)
New Revision: 1385

Modified:
   trunk/checks/fields
   trunk/checks/fields.desc
   trunk/debian/changelog
   trunk/testset/relations/debian/control
   trunk/testset/tags.relations
Log:
* checks/fields{,.desc}:
  + Do not complain about obsolete packages if there are
    non-obsolete alternatives specified and if the obsolete
    package is not listed first.  Issue an info tag for them
    though.  Patch by Adam D. Barratt.  (Closes: #486145)


Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields	2008-06-16 22:47:32 UTC (rev 1384)
+++ trunk/checks/fields	2008-06-16 22:56:55 UTC (rev 1385)
@@ -441,7 +441,7 @@
 			    if ($data =~ /\|/ && ! &$is_dep_field($field));
 
 			for my $dep (split /\s*,\s*/, $data) {
-				my @alternatives;
+				my (@alternatives, @seen_obsolete_packages);
 				push @alternatives, [_split_dep($_), $_] for (split /\s*\|\s*/, $dep);
 
 				if (&$is_dep_field($field)) {
@@ -494,7 +494,7 @@
 					tag "bad-relation", "$field: $part_d_orig"
 					    if $rest;
 
-					tag "depends-on-obsolete-package", "$field: $part_d_orig"
+					push @seen_obsolete_packages, $part_d_orig
 					    if ($obsolete_packages->known($d_pkg) && &$is_dep_field($field));
 
 					tag "depends-on-x-metapackage", "$field: $part_d_orig"
@@ -523,6 +523,15 @@
 					    if ($d_pkg eq 'python' && $d_version->[0] eq '<<' && &$is_dep_field($field)
 						&& $arch_indep && $pkg =~ /^python-/ && ! -f "fields/python-version");
 				}
+
+				for my $pkg (@seen_obsolete_packages) {
+					if ($pkg eq $alternatives[0]->[0] or
+					    scalar @seen_obsolete_packages == scalar @alternatives) {
+						tag "depends-on-obsolete-package", "$field: $pkg";
+					} else {
+						tag "ored-depends-on-obsolete-package", "$field: $pkg";
+					}
+				}
 			}
 			tag "package-depends-on-multiple-libstdc-versions", @seen_libstdcs
 			    if (scalar @seen_libstdcs > 1);

Modified: trunk/checks/fields.desc
===================================================================
--- trunk/checks/fields.desc	2008-06-16 22:47:32 UTC (rev 1384)
+++ trunk/checks/fields.desc	2008-06-16 22:56:55 UTC (rev 1385)
@@ -374,7 +374,14 @@
 Tag: depends-on-obsolete-package
 Type: error
 Info: The package depends on a package that has been superseded.
+  If the superseded package is part of an ORed group, it should not be
+  the first package in the group.
 
+Tag: ored-depends-on-obsolete-package
+Type: info
+Info: The package depends on an ORed group of packages which includes
+  a package that has been superseded.
+
 Tag: build-depends-on-obsolete-package
 Type: error
 Info: The package build-depends on a package that has been superseded.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-06-16 22:47:32 UTC (rev 1384)
+++ trunk/debian/changelog	2008-06-16 22:56:55 UTC (rev 1385)
@@ -6,6 +6,11 @@
     + [FL] Do not check zsh scripts, since zsh -n gives false
       positives.  Downgrades #485885 to wishlist.  Also see
       #175467.  Patch by Raphael Geissert.
+  * checks/fields{,.desc}:
+    + [FL] Do not complain about obsolete packages if there are
+      non-obsolete alternatives specified and if the obsolete
+      package is not listed first.  Issue an info tag for them
+      though.  Patch by Adam D. Barratt.  (Closes: #486145)
 
  --
 

Modified: trunk/testset/relations/debian/control
===================================================================
--- trunk/testset/relations/debian/control	2008-06-16 22:47:32 UTC (rev 1384)
+++ trunk/testset/relations/debian/control	2008-06-16 22:56:55 UTC (rev 1385)
@@ -2,7 +2,7 @@
 Section: misc
 Priority: optional
 Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl, python-all-dev
-Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0),
+Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs,
   car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386],
   caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386]
 Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc]
@@ -23,7 +23,7 @@
 Conflicts: foobar (<< 5&5), foo, relations,
            gnuwdf,
 Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package
-Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}
+Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin
 Description: Strange dependency relationships
  This package declares relationships designed to tickle lintian's "fields"
  check.  It should generate a number of tags for these.
@@ -36,9 +36,9 @@
 Section: non-free/misc
 Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}
 Provides: awk
-Recommends: ${shlibs:Depends}, relations-multiple-libs
+Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl
 Breaks: libpng3 (<< 1.0), libpng2
-Suggests: x-dev
+Suggests: x-dev, ghostscript | gs
 Description: Duplicate library dependency relationships.
  Duplicate library dependency relationships.
  This tests the depending on different versions of the same library

Modified: trunk/testset/tags.relations
===================================================================
--- trunk/testset/tags.relations	2008-06-16 22:47:32 UTC (rev 1384)
+++ trunk/testset/tags.relations	2008-06-16 22:56:55 UTC (rev 1385)
@@ -4,12 +4,15 @@
 E: relations source: build-depends-on-essential-package-without-using-version build-depends-indep: bash
 E: relations source: build-depends-on-essential-package-without-using-version build-depends: findutils
 E: relations source: build-depends-on-obsolete-package build-depends-indep: debmake
+E: relations source: build-depends-on-obsolete-package build-depends-indep: gs
 E: relations source: depends-on-build-essential-package-without-using-version libc6-dev [build-depends: libc6-dev]
 E: relations source: depends-on-build-essential-package-without-using-version make [build-depends-indep: make]
 E: relations source: invalid-arch-string-in-source-relation test [build-conflicts: bar [alpha test]]
 E: relations source: missing-build-dependency libmodule-build-perl
 E: relations source: section-category-mismatch Package relations-multiple-libs
 E: relations-multiple-libs: conflicts-with-dependency depends libpng2
+E: relations-multiple-libs: depends-on-obsolete-package recommends: gs
+E: relations-multiple-libs: depends-on-obsolete-package recommends: gs-gpl
 E: relations-multiple-libs: depends-on-obsolete-package suggests: x-dev
 E: relations-multiple-libs: description-synopsis-is-duplicated
 E: relations-multiple-libs: package-depends-on-multiple-libpng-versions libpng2 libpng3
@@ -23,6 +26,7 @@
 E: relations: conflicts-with-dependency depends relations
 E: relations: depends-on-essential-package-without-using-version depends: coreutils
 E: relations: depends-on-essential-package-without-using-version depends: dpkg
+E: relations: depends-on-obsolete-package recommends: gs
 E: relations: needlessly-depends-on-awk pre-depends
 E: relations: no-copyright-file
 I: relations source: build-depends-without-arch-dep arch-test1
@@ -32,6 +36,8 @@
 I: relations source: build-depends-without-arch-dep foo
 I: relations source: build-depends-without-arch-dep libc6-dev
 I: relations source: build-depends-without-arch-dep mail-transport-agent
+I: relations-multiple-libs: ored-depends-on-obsolete-package suggests: gs
+I: relations: ored-depends-on-obsolete-package recommends: gs-aladdin
 W: relations source: bad-homepage lintian.debian.org
 W: relations source: build-depends-on-1-revision build-depends-indep: libfoo (>= 1.2-1)
 W: relations source: package-depends-on-itself relations depends


Reply to: