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

[lintian] 02/08: L::Lab: Stop extracting metadata for the reporting framework



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 1d3e54a1e7b1f7c9b3f74cfaa807d59b6f77fedb
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Feb 22 10:02:41 2015 +0100

    L::Lab: Stop extracting metadata for the reporting framework
    
    The reporting framework is now self-contained without the laboratory,
    so there is no need for the laboratory to store these fields.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 debian/changelog   |  4 ++++
 lib/Lintian/Lab.pm | 40 ++++++++--------------------------------
 2 files changed, 12 insertions(+), 32 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index df6cebf..532ff81 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -109,6 +109,10 @@ lintian (2.5.31) UNRELEASED; urgency=medium
   * lib/Lintian/Internal/FrontendUtil.pm:
     + [NT] Work around a bug in autodie, where an fdopen of a
       file-descriptor always failed with "bad file descriptor".
+  * lib/Lintian/Lab.pm:
+    + [NT] Null fields extra metadata fields in the lab storage
+      that are no longer used.  These were previously used by
+      the reporting framework.
   * lib/Lintian/Util.pm:
     + [NT] Prefer dpkg-deb --ctrl-tarfile to "ar p" when dpkg
       is recent enough.
diff --git a/lib/Lintian/Lab.pm b/lib/Lintian/Lab.pm
index bd97f52..99e94fb 100644
--- a/lib/Lintian/Lab.pm
+++ b/lib/Lintian/Lab.pm
@@ -967,50 +967,26 @@ sub _new_entry {
         'file'    => $pkg_path,
         'version' => $pkg_version,
     );
-    my $field = sub {
-        my ($f) = @_;
-        my $v;
-        return $proc->get_field($f) if $proc;
-        return $entry->info->field($f, '');
-    };
 
     if ($pkg_type eq 'source') {
-        my $up = $field->('uploaders');
-        my $maint = $field->('maintainer');
-        my $bin = $field->('binary');
-
-        # Normalize the fields - usually this will be "no-ops", but we
-        # do check some really warped packages every now and then...
-
-        if ($up) {
-            $up =~ s/\n/ /og;
-            $up = join(', ', split(m/\s*,\s*/o, $up));
-        }
-        if ($bin) {
-            $bin   =~ s/\n\s*//og;
-            $bin = join(', ', split(m/\s*,\s*/o, $bin));
-        }
 
-        $maint =~ s/\n\s*//og if $maint;
-        $data{'binary'}     = $bin;
         $data{'source'}     = $pkg_name;
-        $data{'area'}       = ''; # just blank this - we do not know it :)
-        $data{'maintainer'} = $maint;
-        $data{'uploaders'}  = $up;
+        # We *used* to rely on these for the reporting
+        # framework.
+        $data{'binary'}     = ''; # Only for compat
+        $data{'area'}       = ''; # Only for compat
+        $data{'maintainer'} = ''; # Only for compat
+        $data{'uploaders'}  = ''; # Only for compat
     } elsif ($pkg_type eq 'changes') {
         $data{'architecture'} = $entry->pkg_arch;
         $data{'source'}       = $pkg_name;
     } elsif ($pkg_type eq 'binary' or $pkg_type eq 'udeb') {
-        my $area = 'main';
-        my $s = $field->('section');
-        if ($s && $s =~ m,\s*([a-zA-Z0-9-_]+)/,o) {
-            $area = $1;
-        }
         $data{'architecture'}   = $entry->pkg_arch;
-        $data{'area'}           = $area;
         $data{'package'}        = $pkg_name;
         $data{'source'}         = $entry->pkg_src;
         $data{'source-version'} = $entry->pkg_src_version;
+        # Previously used by the reporting framework
+        $data{'area'}           = ''; # Only for compat
     } else {
         croak "Unknown package type: $pkg_type";
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: