[libdpkg-parse-perl] 01/03: Add patch to avoid warnings about uninitialized value in Perl 5.26.

gregor herrmann gregoa at debian.org
Wed Aug 9 02:20:54 UTC 2017


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

gregoa pushed a commit to branch master
in repository libdpkg-parse-perl.

commit a15166975aea6ac4acb717614aef1e95edf3bc1a
Author: gregor herrmann <gregoa at debian.org>
Date:   Tue Aug 8 22:16:57 2017 -0400

    Add patch to avoid warnings about uninitialized value in Perl 5.26.
---
 debian/patches/perl5.26.patch | 32 ++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 2 files changed, 33 insertions(+)

diff --git a/debian/patches/perl5.26.patch b/debian/patches/perl5.26.patch
new file mode 100644
index 0000000..b448964
--- /dev/null
+++ b/debian/patches/perl5.26.patch
@@ -0,0 +1,32 @@
+Description: set entry to an empty string instead of undef
+ in order to avoid "Use of uninitialized value $entry" warnings.
+ Quoting perldelta for 5.26:
+   Code like $x = $x . "a" was incorrectly failing to yield a use of
+   uninitialized value warning when $x was a lexical variable with an
+   undefined value. That has now been fixed. [perl #127877]
+Origin: vendor
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2017-08-08
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=122749
+Bug: https://rt.cpan.org/Ticket/Display.html?id=122749
+
+--- a/lib/DPKG/Parse.pm
++++ b/lib/DPKG/Parse.pm
+@@ -111,7 +111,7 @@
+         die "Cannot find " . $pkg->filename . ", or it's not a file at all!";
+     }
+     open(STATUS, $pkg->filename);
+-    my $entry;
++    my $entry = '';
+     my $line_num = -1;
+     my $entry_line = 0;
+     STATUSLINE: while (my $line = <STATUS>) {
+@@ -120,7 +120,7 @@
+             my $dpkg_entry = DPKG::Parse::Entry->new('data' => $entry, debug => $pkg->debug, line_num => $entry_line);
+             push(@{$pkg->{'entryarray'}}, $dpkg_entry);
+             $pkg->{'entryhash'}->{$dpkg_entry->package} = $dpkg_entry;
+-            $entry = undef;
++            $entry = '';
+             $entry_line = $line_num + 1;
+             next STATUSLINE;
+         }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..18e1274
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+perl5.26.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git



More information about the Pkg-perl-cvs-commits mailing list