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

[lintian] 01/01: c/nmu.pm: Use index_resolved_path over debfiles



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

nthykier pushed a commit to branch master
in repository lintian.

commit 120f0b4706c50a1530eb561e5aa59a9683abc432
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Sep 27 17:01:36 2014 +0200

    c/nmu.pm: Use index_resolved_path over debfiles
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/nmu.desc | 2 +-
 checks/nmu.pm   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/checks/nmu.desc b/checks/nmu.desc
index 0d59a1c..88cb56e 100644
--- a/checks/nmu.desc
+++ b/checks/nmu.desc
@@ -2,7 +2,7 @@ Check-Script: nmu
 Author: Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
 Abbrev: nmu
 Type: source
-Needs-Info: debfiles, unpacked
+Needs-Info: unpacked
 Info: This script checks if a source package is consistent about its NMU-ness.
 
 Tag: orphaned-package-should-not-have-uploaders
diff --git a/checks/nmu.pm b/checks/nmu.pm
index 4a24406..b14a838 100644
--- a/checks/nmu.pm
+++ b/checks/nmu.pm
@@ -34,14 +34,17 @@ sub run {
     my $changelog_mentions_local = 0;
     my $changelog_mentions_qa = 0;
     my $changelog_mentions_team_upload = 0;
+    my $debian_dir = $info->index_resolved_path('debian/');
+    my $chf;
+    $chf = $debian_dir->child('changelog') if $debian_dir;
 
     # This isn't really an NMU check, but right now no other check
     # looks at debian/changelog in source packages.  Catch a
     # debian/changelog file that's a symlink.
-    if (-l $info->debfiles('changelog')) {
+    if ($chf and $chf->is_symlink) {
         tag 'changelog-is-symlink';
-        return;
     }
+    return if not $info->changelog;
 
     # Get some data from the changelog file.
     my ($entry) = $info->changelog->data;

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


Reply to: