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

[SCM] Debian package checker branch, master, updated. 2.4.3-148-gac546b3



The following commit has been merged in the master branch:
commit ac546b35c685adff39d7afe387177d9630b02714
Author: Niels Thykier <niels@thykier.net>
Date:   Mon Jan 17 11:54:12 2011 +0100

    Do not emit breaks-without-version if the package is replaced
    
     * checks/fields{,.desc}:
        + [NT] Fixed false positives for breaks-without-version.  The tag
          will no longer be emitted if the package listed in Breaks is also
          listed in Replaces.  Thanks to Modestas Vainius for the report.
          (Closes: #605744)

diff --git a/checks/fields b/checks/fields
index 722849f..b163c16 100644
--- a/checks/fields
+++ b/checks/fields
@@ -531,11 +531,12 @@ if ($type eq 'binary') {
 if (($type eq "binary") || ($type eq 'udeb')) {
 	my (%deps, %fields, %parsed);
 	my $javalib = 0;
+	my $replaces = Lintian::Relation->new($info->field('replaces')//'');
 	$javalib = 1 if($pkg =~ m/^lib.*-(?:java|gcj)$/o);
 	for my $field (qw(depends pre-depends recommends suggests conflicts provides enhances replaces breaks)) {
 		next unless defined $info->field($field);
 		#Get data and clean it
-		my $data = $info->field($field);;
+		my $data = $info->field($field);
 		my $javadep = 0;
 		unfold($field, \$data);
 		$fields{$field} = $data;
@@ -589,7 +590,9 @@ if (($type eq "binary") || ($type eq 'udeb')) {
 				    if $d_pkg !~ /^[a-z0-9][-+\.a-z0-9]+$/;
 
 				tag "breaks-without-version", "$part_d_orig"
-				    if ($field eq "breaks" && !$d_version->[0] && !$VIRTUAL_PACKAGES->known($d_pkg));
+				    if ($field eq "breaks" && !$d_version->[0] && !$VIRTUAL_PACKAGES->known($d_pkg)
+					&& !$replaces->implies("$part_d_orig")
+				    );
 
 				tag "conflicts-with-version", "$part_d_orig"
 				    if ($field eq 'conflicts' && $d_version->[0]);
diff --git a/checks/fields.desc b/checks/fields.desc
index 719e1da..53d4ff4 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -749,12 +749,17 @@ Info: The package seems to conflict with one of its dependencies,
 Tag: breaks-without-version
 Severity: normal
 Certainty: possible
-Ref: policy 7.3
+Ref: policy 7.3, policy 7.4
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605744
 Info: This package declares a Breaks relationship with another package
  that has no version number.  Normally, Breaks should be used to indicate
  an incompatibility with a specific version of another package, or with
  all versions predating a fix.  If the two packages can never be installed
  at the same time, Conflicts should normally be used instead.
+ .
+ Note this tag can also be issued, if a package has been split into two
+ completely new ones.  In this case, this package is missing a Replaces
+ on the old package.
 
 Tag: conflicts-with-version
 Severity: normal
diff --git a/debian/changelog b/debian/changelog
index 4a41507..e208282 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -56,6 +56,10 @@ lintian (2.5.0) UNRELEASED; urgency=low
     + [NT] Corrected Policy references for the uploader tags.  Thanks to
       David Prévot for spotting this issue and providing a patch.
       (Closes: #602632)
+    + [NT] Fixed false positives for breaks-without-version.  The tag
+      will no longer be emitted if the package listed in Breaks is also
+      listed in Replaces.  Thanks to Modestas Vainius for the report.
+      (Closes: #605744)
   * checks/files{,.desc}:
     + [NT] Fixed false-positive extra-license-file for license.ui files.
       Thanks to Jeremy Sanders for the report.  (Closes: #595941)
diff --git a/t/tests/fields-depends-general/debian/debian/control.in b/t/tests/fields-depends-general/debian/debian/control.in
index bc00c33..3a27159 100644
--- a/t/tests/fields-depends-general/debian/debian/control.in
+++ b/t/tests/fields-depends-general/debian/debian/control.in
@@ -10,7 +10,9 @@ Architecture: {$architecture}
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, xorg, bash,
  conflict-dep, gawk | awk, new-package | xbase-clients, {$srcpkg},
  gaim, emacs21, emacs22, makedev
-Breaks: package-without-version, {$srcpkg} (<< 0.1)
+Breaks: package-without-version, {$srcpkg} (<< 0.1),
+ replaced-wo-version
+Replaces: replaced-wo-version
 Conflicts: package-with-version (<< 3.0), conflict-dep
 Description: {$description}
  This is a test package designed to exercise some feature or tag of

-- 
Debian package checker


Reply to: