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

[lintian] 01/05: c/phppear.pm: Use L::Path instead of debfiles



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

nthykier pushed a commit to branch master
in repository lintian.

commit bff3fa69e637f3c67b065b96c653642dfecd5597
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Sep 28 15:16:19 2014 +0200

    c/phppear.pm: Use L::Path instead of debfiles
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/phppear.desc |  2 +-
 checks/phppear.pm   | 15 ++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/checks/phppear.desc b/checks/phppear.desc
index 64d3dc3..ccf7a57 100644
--- a/checks/phppear.desc
+++ b/checks/phppear.desc
@@ -2,7 +2,7 @@ Check-Script: phppear
 Author: Mathieu Parent <sathieu@debian.org>
 Abbrev: phppear
 Type: source
-Needs-Info: debfiles, unpacked
+Needs-Info: unpacked
 Info: This script checks if the packages comply with various aspects of the
  debian PHP policy.
 
diff --git a/checks/phppear.pm b/checks/phppear.pm
index e794179..0295c37 100644
--- a/checks/phppear.pm
+++ b/checks/phppear.pm
@@ -66,8 +66,9 @@ sub run {
                 tag 'pear-package-not-using-substvar','${phppear:description}';
             }
             # Checking overrides
-            my $overrides = $info->debfiles('pkg-php-tools-overrides');
-            if (-f $overrides) {
+            my $overrides
+              = $info->index_resolved_path('debian/pkg-php-tools-overrides');
+            if ($overrides and $overrides->is_file) {
                 if (!$bdepends->implies('pkg-php-tools (>= 1~)')) {
                     tag 'pear-package-feature-requires-newer-pkg-php-tools',
                       '(>= 1~)', 'for package name overrides';
@@ -81,7 +82,8 @@ sub run {
                 }
             }
             if (defined($package_xml) && $package_xml->is_regular_file) {
-          # Wild guess package type as in PEAR_PackageFile_v2::getPackageType()
+                # Wild guess package type as in
+                # PEAR_PackageFile_v2::getPackageType()
                 my $package_xml_fd = $package_xml->open;
                 while (<$package_xml_fd>) {
                     if (
@@ -145,14 +147,13 @@ sub run {
             || defined($channel_xml)
             || defined($composer_json))
       ) {
-        my $rules = $info->debfiles('rules');
-        if (not -l $rules
-            or (-f $rules and is_ancestor_of($info->debfiles, $rules))) {
+        my $rules = $info->index_resolved_path('debian/rules');
+        if ($rules and $rules->is_open_ok) {
             my $has_buildsystem_phppear = 0;
             my $has_addon_phppear = 0;
             my $has_addon_phpcomposer= 0;
             my $has_addon_php5 = 0;
-            open(my $rules_fd, '<', $rules);
+            my $rules_fd = $rules->open;
             while (<$rules_fd>) {
                 while (s,\\$,, and defined(my $cont = <$rules_fd>)) {
                     $_ .= $cont;

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


Reply to: