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

[SCM] Debian package checker branch, master, updated. 1.24.4-73-g9d359a4



The following commit has been merged in the master branch:
commit 9d359a4eb50dc4b2eb81389ed5aefe3fdc6d25f9
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Sat Aug 30 12:40:06 2008 +0100

    Only complain at Info about obsolete build-deps that have alternatives.
    
    Don't issue an error tag for obsolete packages in Build-Depends fields if
    the package is part of an "ORed group" of packages and is not listed
    first.  As with Depends, an info tag will still be issued for such
    packages.  (Closes: #496875)

diff --git a/checks/fields b/checks/fields
index d83e402..9b26ed6 100644
--- a/checks/fields
+++ b/checks/fields
@@ -666,7 +666,7 @@ if ($type eq "source") {
 			$depend{$field} = $data;
 
 			for my $dep (split /\s*,\s*/, $data) {
-				my @alternatives;
+				my (@alternatives, @seen_obsolete_packages);
 				push @alternatives, [_split_dep($_), $_] for (split /\s*\|\s*/, $dep);
 
 				tag "virtual-package-depends-without-real-package-depends", "$field: $alternatives[0]->[0]"
@@ -689,7 +689,7 @@ if ($type eq "source") {
 
 					tag "build-depends-on-essential-package-without-using-version", "$field: $part_d_orig"
 					    if ($d_pkg ne "coreutils" && $known_essential{$d_pkg} && ! $d_version->[0]);
-					tag "build-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 "build-depends-on-x-metapackage", "$field: $part_d_orig"
@@ -701,6 +701,15 @@ if ($type eq "source") {
 					tag "bad-relation", "$field: $part_d_orig"
 					    if $rest;
 				}
+
+				for my $pkg (@seen_obsolete_packages) {
+					if ($pkg eq $alternatives[0]->[0] or
+					    scalar @seen_obsolete_packages == scalar @alternatives) {
+						tag "build-depends-on-obsolete-package", "$field: $pkg";
+					} else {
+						tag "ored-build-depends-on-obsolete-package", "$field: $pkg";
+					}
+				}
 			}
 		}
 	}
diff --git a/checks/fields.desc b/checks/fields.desc
index b0af1ea..bb827d9 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -507,6 +507,15 @@ Type: error
 Severity: important
 Certainty: possible
 Info: The package build-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-build-depends-on-obsolete-package
+Type: info
+Severity: minor
+Certainty: possible
+Info: The package build-depends on an ORed group of packages which includes
+ a package that has been superseded.
 
 Tag: depends-on-old-emacs
 Type: warning
diff --git a/checks/fields.desc b/checks/fields.desc.bak
similarity index 100%
copy from checks/fields.desc
copy to checks/fields.desc.bak
diff --git a/debian/changelog b/debian/changelog
index b36cfe5..a607ce2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,10 @@ lintian (1.25.0) unstable; urgency=low
   * checks/fields{,.desc}:
     + [RA] Check for a maintainer also listed in uploaders.  Patch from
       Raphael Geissert.
+    + [ADB] Don't issue an error tag for obsolete packages in Build-Depends
+      fields if the package is part of an "ORed group" of packages and is
+      not listed first.  As with Depends, an info tag will still be issued
+      for such packages.  (Closes: #496875)
   * checks/files{,.desc}:
     + [RA] Check for embedding copies of jsjac and jsMath.  Patch from
       Raphael Geissert.
diff --git a/testset/tags.relations b/testset/tags.relations
index 10b9470..9f127f4 100644
--- a/testset/tags.relations
+++ b/testset/tags.relations
@@ -4,7 +4,6 @@ E: relations source: build-depends-on-build-essential build-depends-indep
 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]]
@@ -36,6 +35,7 @@ I: relations source: build-depends-without-arch-dep findutils
 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 source: ored-build-depends-on-obsolete-package build-depends-indep: gs
 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

-- 
Debian package checker


Reply to: