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

[SCM] Debian package checker branch, master, updated. 2.5.4-29-gcb0ffc2



The following commit has been merged in the master branch:
commit cb0ffc2c43ca4aa102a6d979211c875c29a603ef
Author: Jakub Wilk <jwilk@debian.org>
Date:   Sun Dec 4 18:15:29 2011 +0100

    Properly handle uploaders with commas
    
    Split uploader field only on commas if they follow a ">" character.
    
    Drop uploader-address-missing tag as it cannot be emitted reliably
    anymore.
    
    Based on Jakub Wilk's patch (#485705).
    
    Acked-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/fields b/checks/fields
index c01da40..aa04bec 100644
--- a/checks/fields
+++ b/checks/fields
@@ -342,8 +342,9 @@ for my $f (qw(maintainer uploaders)) {
         unfold($f, \$maintainer);
 
         if ($f eq 'uploaders') {
-            my @uploaders = split /\s*,\s*/, $maintainer;
             my %duplicate_uploaders;
+            my @uploaders = map { split /\@\S+\K\s*,\s*/ }
+                split />\K\s*,\s*/, $maintainer;
             for my $uploader (@uploaders) {
                 check_maintainer($uploader, 'uploader');
                 if ( ((grep { $_ eq $uploader } @uploaders) > 1) and
diff --git a/checks/fields.desc b/checks/fields.desc
index 695a21a..6b503c9 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -206,14 +206,6 @@ Info: The uploader field seems to contain just an email address. It must
  contain the package uploader's name and email address.
 Ref: policy 5.6.3
 
-Tag: uploader-address-missing
-Severity: important
-Certainty: certain
-Info: The uploader field should contain the package uploader's name and
- email address, with the name followed by the address inside angle
- brackets (&lt; and &gt;).  The address seems to be missing.
-Ref: policy 5.6.3
-
 Tag: uploader-address-malformed
 Severity: serious
 Certainty: certain
diff --git a/checks/nmu b/checks/nmu
index 105c722..47abcb4 100644
--- a/checks/nmu
+++ b/checks/nmu
@@ -101,7 +101,7 @@ if ($version =~ /local/i) {
 
 my $upload_is_nmu = $uploader ne $maintainer;
 if (defined $uploaders) {
-    my @uploaders = map { canonicalize($_) } split /,/, $uploaders;
+    my @uploaders = map { canonicalize($_) } split />\K\s*,\s*/, $uploaders;
     $upload_is_nmu = 0 if grep /^\s*\Q$uploader\E\s*$/, @uploaders;
 }
 
diff --git a/debian/changelog b/debian/changelog
index 3358eac..a1dd934 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ lintian (2.5.5) UNRELEASED; urgency=low
   * Summary of tag changes:
     + Added:
       - preinst-uses-dpkg-maintscript-helper-without-predepends
+    + Removed:
+      - uploader-address-missing
 
   * checks/*:
     + [NT] Fixed assumptions about certain fields being present.
@@ -12,12 +14,18 @@ lintian (2.5.5) UNRELEASED; urgency=low
     + [NT] Added dh-autoreconf as a build-depends alternative to
       libtool for suppressing ancient-libtool warning.  Thanks to
       Felix Geyer for the report.  (Closes: #650325)
+  * checks/fields{,.desc}:
+    + [JW] Properly handle uploader names with commas.
+      (Closes: #485705)
+    + [NT] Removed uploader-address-missing tag.
   * checks/files:
     + [JW,NT] Skip "Multi-Arch: same" check of gzip files if their
       install path contains the architecture.  (Closes: #650665)
     + [JW]  Fixed a false-negative "empty-binary-package" if the
       package contained the /u/s/doc/$pkg symlink.
       (Closes: #650959)
+  * checks/nmu:
+    + [JW] Properly handle uploader names with commas.
   * checks/scripts:
     + [NT] Accepted patch from Evan Broder to check for missing
       versioned pre-depends on dpkg when using maintscript helper.
@@ -46,6 +54,9 @@ lintian (2.5.5) UNRELEASED; urgency=low
     + [NT] Keep auto-cleaned collections until all processables in
       the group has been checked.
 
+  * lib/Lintian/Check.pm:
+    + [NT] Do not check for missing uploader address as it cannot be
+      done reliably anymore.
   * lib/Lintian/Collect/{Binary,Source}.pm:
     + [NT] Assume packages to be non-native when it cannot be
       accurately determined due to missing version field.
@@ -64,6 +75,9 @@ lintian (2.5.5) UNRELEASED; urgency=low
     + [NT] Use part of the file name as package name if the mandatory
       "Package" or "Source" fields are missing rather than choking.
 
+  * reporting/html_reports:
+    + [JW] Properly handle uploader names with commas.
+
  -- Niels Thykier <niels@thykier.net>  Tue, 29 Nov 2011 18:42:37 +0100
 
 lintian (2.5.4) unstable; urgency=medium
diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index fed1179..8da067d 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -176,7 +176,9 @@ sub check_maintainer {
 
     # Don't issue the malformed tag twice if we already saw problems.
     if (not $mail) {
-        tag "$field-address-missing", $maintainer;
+        # Cannot be done accurately for uploaders due to changes with commas
+        # (see #485705)
+        tag "$field-address-missing", $maintainer unless $field eq 'uploader';
     } else {
         if (not $malformed and not Email::Valid->address($mail)) {
             # Either not a valid email or possibly missing a comma between
diff --git a/reporting/html_reports b/reporting/html_reports
index 00aed20..1ab81b0 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -312,7 +312,7 @@ while (<>) {
     # If the package had uploaders listed, also add the information to
     # %by_uploaders (still sharing the data between hashes).
     if ($uploaders) {
-        my @uploaders = split (/\s*,\s*/, $uploaders);
+        my @uploaders = split (/>\K\s*,\s*/, $uploaders);
         for (@uploaders) {
             my $uploader = map_maintainer ($_);
             next if $uploader eq $maintainer;
diff --git a/t/tests/fields-uploaders/debian/debian/control.in b/t/tests/fields-uploaders/debian/debian/control.in
index c8c67df..f3e3e93 100644
--- a/t/tests/fields-uploaders/debian/debian/control.in
+++ b/t/tests/fields-uploaders/debian/debian/control.in
@@ -7,8 +7,7 @@ Uploaders: Mrs. Localhost <user@localhost>,
            One-name <has-only-1-name@elsewhere.com>,
            Malformed Email <@ddress@myspace.com>,
            John A. J. Doe <i.am.ok@somewhere.com>,
-           Doris Double-Email <Doris Double-Email <doris@demail.com>>,
-           I have no email
+           Doris Double-Email <Doris Double-Email <doris@demail.com>>
 Standards-Version: {$standards_version}
 Build-Depends: debhelper (>= 7)
 
diff --git a/t/tests/fields-uploaders/desc b/t/tests/fields-uploaders/desc
index 7cbcbb8..c1a6fc5 100644
--- a/t/tests/fields-uploaders/desc
+++ b/t/tests/fields-uploaders/desc
@@ -6,5 +6,4 @@ Test-For:
  uploader-address-is-on-localhost
  uploader-address-looks-weird
  uploader-address-malformed
- uploader-address-missing
  uploader-not-full-name
diff --git a/t/tests/fields-uploaders/tags b/t/tests/fields-uploaders/tags
index 4db149f..5aaa723 100644
--- a/t/tests/fields-uploaders/tags
+++ b/t/tests/fields-uploaders/tags
@@ -2,6 +2,5 @@ E: fields-uploaders source: uploader-address-is-on-localhost Mrs. Localhost <use
 E: fields-uploaders source: uploader-address-malformed Doris Double-Email <Doris Double-Email <doris@demail.com>>
 E: fields-uploaders source: uploader-address-malformed Malformed Email <@ddress@myspace.com>
 E: fields-uploaders source: uploader-address-malformed Mrs. Localhost <user@localhost>
-E: fields-uploaders source: uploader-address-missing I have no email
 W: fields-uploaders source: uploader-address-looks-weird Mr. Weird<no-space@somewhere.com>
 W: fields-uploaders source: uploader-not-full-name One-name
diff --git a/testset/tags.foo++ b/testset/tags.foo++
index b7e5f66..b4bbea5 100644
--- a/testset/tags.foo++
+++ b/testset/tags.foo++
@@ -3,10 +3,9 @@ E: foo++ source: build-info-in-binary-control-file-section Package foo++
 E: foo++ source: debian-control-file-uses-obsolete-national-encoding at line 19
 E: foo++ source: malformed-dm-upload-allowed no
 E: foo++ source: uploader-address-is-on-localhost Jeroen van Wolffelaar<jeroen@localhost.localdomain>
-E: foo++ source: uploader-address-malformed I am afraid of spam and think this helps <no_spam_please AT debian.org>
+E: foo++ source: uploader-address-malformed Josip, I am afraid of spam and think this helps <no_spam_please AT debian.org>
 E: foo++ source: uploader-address-malformed Marc 'HE' Brockschmidt <he@unknown>
 E: foo++ source: uploader-address-malformed Yama@gotchi
-E: foo++ source: uploader-address-missing Josip
 E: foo++ source: uploader-name-missing Yama@gotchi
 E: foo++ source: wrong-debian-qa-address-set-as-maintainer Lintian Maintainer <debian-qa@lists.debian.org>
 E: foo++-helper: wrong-debian-qa-address-set-as-maintainer Lintian Maintainer <debian-qa@lists.debian.org>
@@ -22,7 +21,6 @@ W: foo++ source: debian-watch-file-in-native-package
 W: foo++ source: debian-watch-file-unknown-version 0
 W: foo++ source: uploader-address-looks-weird Jeroen van Wolffelaar<jeroen@localhost.localdomain>
 W: foo++ source: uploader-not-full-name Frank
-W: foo++ source: uploader-not-full-name Josip
 W: foo++-helper: empty-binary-package
 W: foo++: latest-debian-changelog-entry-without-new-date
 W: foo++: readme-debian-contains-invalid-email-address foo@unknown

-- 
Debian package checker


Reply to: