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

[SCM] Debian package checker branch, master, updated. 2.4.1-27-gc25befe



The following commit has been merged in the master branch:
commit c25befef03139fdc9df2d06e2a1b896c211e0f78
Author: Russ Allbery <rra@debian.org>
Date:   Sun Jun 27 13:43:12 2010 -0700

    Warn of using Conflicts with a version
    
    + [RA] Warn of using Conflicts with a version, which should normally
      be Breaks instead, but only at wild-guess certainty for now.

diff --git a/checks/fields b/checks/fields
index 1448205..5b4b5e7 100644
--- a/checks/fields
+++ b/checks/fields
@@ -576,6 +576,9 @@ if (($type eq "binary") || ($type eq 'udeb')) {
 				tag "breaks-without-version", "$part_d_orig"
 				    if ($field eq "breaks" && !$d_version->[0] && !$VIRTUAL_PACKAGES->known($d_pkg));
 
+				tag "conflicts-with-version", "$part_d_orig"
+				    if ($field eq 'conflicts' && $d_version->[0]);
+
 				tag "obsolete-relation-form", "$field: $part_d_orig"
 				    if ($d_version && grep { $d_version->[0] eq $_ } ("<", ">"));
 
diff --git a/checks/fields.desc b/checks/fields.desc
index 2337d71..eff85cc 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -756,6 +756,18 @@ Info: This package declares a Breaks relationship with another package
  all versions predating a fix.  If the two packages can never be installed
  at the same time, Conflicts should normally be used instead.
 
+Tag: conflicts-with-version
+Severity: normal
+Certainty: wild-guess
+Ref: policy 7.4
+Info: An earlier-than version clause is normally an indication that Breaks
+ should be used instead of Conflicts.  Breaks is a weaker requirement that
+ provides the package manager more leeway to find a valid upgrade path.
+ Conflicts should only be used if two packages can never be unpacked at
+ the same time, or for some situations involving virtual packages (where a
+ version clause is not appropriate).  In particular, when moving files
+ between packages, use Breaks plus Replaces, not Conflicts plus Replaces.
+
 Tag: bad-menu-item
 Severity: important
 Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index 3d271bd..2f64aa9 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ lintian (2.4.2) UNRELEASED; urgency=low
     + Added:
       - arch-wildcard-in-binary-package
       - bad-provided-package-name
+      - conflicts-with-version
       - copyright-refers-to-deprecated-bsd-license-file
       - init.d-script-depends-on-unknown-virtual-facility
       - xc-package-type-in-debian-control (pedantic)
@@ -34,6 +35,8 @@ lintian (2.4.2) UNRELEASED; urgency=low
       Architecture field of binary and source packages.
     + [RA] Rename arch-any-in-binary-pkg to arch-wildcard-in-binary-package
       and diagnose any architecture wildcard, not just "any".
+    + [RA] Warn of using Conflicts with a version, which should normally
+      be Breaks instead, but only at wild-guess certainty for now.
   * checks/huge-usr-share{,.desc}:
     + [RA] Count file size from the tar listing rather than using du.  The
       results of du vary based on file system and other factors and make
diff --git a/t/tests/fields-depends-general/debian/debian/control.in b/t/tests/fields-depends-general/debian/debian/control.in
index 65e41ae..ca24c2d 100644
--- a/t/tests/fields-depends-general/debian/debian/control.in
+++ b/t/tests/fields-depends-general/debian/debian/control.in
@@ -11,6 +11,7 @@ Package: {$srcpkg}
 Architecture: {$architecture}
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, xorg
 Breaks: package-without-version
+Conflicts: package-with-version (<< 3.0)
 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
diff --git a/t/tests/fields-depends-general/desc b/t/tests/fields-depends-general/desc
index 910bc12..b38609b 100644
--- a/t/tests/fields-depends-general/desc
+++ b/t/tests/fields-depends-general/desc
@@ -8,6 +8,7 @@ Test-For:
  build-depends-on-non-build-package
  build-depends-on-python-dev-with-no-arch-any
  conflicting-negation-in-source-relation
+ conflicts-with-version
  depends-on-metapackage
  invalid-arch-string-in-source-relation
  lib-recommends-documentation
diff --git a/t/tests/fields-depends-general/tags b/t/tests/fields-depends-general/tags
index c56235a..62c13a3 100644
--- a/t/tests/fields-depends-general/tags
+++ b/t/tests/fields-depends-general/tags
@@ -5,6 +5,7 @@ E: fields-depends-general source: invalid-arch-string-in-source-relation all [bu
 E: fields-depends-general source: invalid-arch-string-in-source-relation i3!86 [build-depends: baz [source i3!86]]
 E: fields-depends-general source: invalid-arch-string-in-source-relation source [build-depends: baz [source i3!86]]
 E: fields-depends-general: depends-on-metapackage depends: xorg
+I: fields-depends-general: conflicts-with-version package-with-version (<< 3.0)
 W: fields-depends-general source: build-depends-on-python-dev-with-no-arch-any
 W: fields-depends-general: breaks-without-version package-without-version
 W: libfields-depends-general: lib-recommends-documentation recommends: debconf-doc

-- 
Debian package checker


Reply to: