[lintian] 02/02: Avoid emitting "Can't use an undefined value as an ARRAY reference" warnings when debian/patches is a file, not a directory. (Closes: #889535)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 76a12dd8be5bd2308918d4019a880d84ced00877
Author: Chris Lamb <lamby@debian.org>
Date: Sun Feb 4 09:36:00 2018 +0000
Avoid emitting "Can't use an undefined value as an ARRAY reference" warnings when debian/patches is a file, not a directory. (Closes: #889535)
---
checks/patch-systems.pm | 5 +++--
debian/changelog | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/checks/patch-systems.pm b/checks/patch-systems.pm
index cac174e..d73a653 100644
--- a/checks/patch-systems.pm
+++ b/checks/patch-systems.pm
@@ -47,13 +47,14 @@ sub run {
my $droot = $info->index_resolved_path('debian/');
return if not $droot;
my $dpdir = $droot->resolve_path('patches');
+ my $resolved;
my $patch_series;
my %known_files;
# Find debian/patches/series, assuming debian/patches is a (symlink to a)
# dir. There are cases, where it is a file (ctwm: #778556)
if ($dpdir and ($dpdir->is_dir or $dpdir->is_symlink)) {
- my $resolved = $dpdir->resolve_path;
+ $resolved = $dpdir->resolve_path;
$patch_series = $resolved->resolve_path('series') if $resolved->is_dir;
}
@@ -227,7 +228,7 @@ sub run {
}
#----- look for unreferenced files in debian/patches
- if ($dpdir and $format ne '2.0') {
+ if ($resolved and $format ne '2.0') {
# Check all series files, including $vendor.series
foreach my $file ($dpdir->children) {
next unless $file =~ /\/(.+\.)?series$/;
diff --git a/debian/changelog b/debian/changelog
index f2e887d..e18bb23 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,10 @@ lintian (2.5.74) UNRELEASED; urgency=medium
+ [CL] Avoid false positives when checking binary packages depending on
toolchain packages by ignoring packages starting with "dh-". Thanks
to Josh Triplett for the report. (Closes: #889486)
+ * checks/patch-systems.pm:
+ + [CL] Avoid emitting "Can't use an undefined value as an ARRAY
+ reference" warnings when debian/patches is a file, not a directory.
+ (Closes: #889535)
* checks/scripts.desc:
+ [CL] Improve, elaborate and tidy the long description of the
maintainer-script-should-not-use-recursive-chown-or-chmod tag.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: