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

[lintian] 01/02: L::C::Package: Update example in SYNOPSIS



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

nthykier pushed a commit to branch master
in repository lintian.

commit 1f842d0d5e5de8258655485341cb09e6165ab555
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Sep 28 22:19:33 2014 +0200

    L::C::Package: Update example in SYNOPSIS
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Lintian/Collect/Package.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index a69d008..4ad7cea 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -69,13 +69,13 @@ Lintian::Collect::Package - Lintian base interface to binary and source package
     my ($name, $type, $dir) = ('foobar', 'source', '/path/to/lab-entry');
     my $info = Lintian::Collect->new ($name, $type, $dir);
     my $filename = "etc/conf.d/$name.conf";
-    my $file = $info->index($filename);
-    if ($file && $file->is_regular_file) {
-        open(my $fd, '<', $info->unpacked($file));
+    my $file = $info->index_resolved_path($filename);
+    if ($file and $file->is_open_ok) {
+        my $fd = $info->open;
         # Use $fd ...
         close($fd);
     } elsif ($file) {
-        print "$file is available, but not a regular file\n";
+        print "$file is available, but is not a file or unsafe to open\n";
     } else {
         print "$file is missing\n";
     }

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


Reply to: