[Reproducible-commits] [dpkg] 86/105: Dpkg::Changelog: Handle undef versions
Niko Tyni
ntyni at moszumanska.debian.org
Mon May 2 13:49:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch ntyni/reproducible_builds
in repository dpkg.
commit 396e17158165df0a62f032dd95f23901e8da2ade
Author: Guillem Jover <guillem at debian.org>
Date: Sun Apr 10 00:06:04 2016 +0200
Dpkg::Changelog: Handle undef versions
When the changelog entry header line has an empty versions, the code was
trying to use an undef version to access a hash.
---
debian/changelog | 2 ++
scripts/Dpkg/Changelog.pm | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d855667..f7a178c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -110,6 +110,8 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
check_header() and check_trailer() ones.
- Use “GnuPG” instead of “gpg” in error messages to refer to the software
in Dpkg::Source::Package.
+ - Handle undef versions in Dpkg::Changelog from empty versions in
+ changelog entry header lines.
* Build system:
- Fix building development documentation.
- Remove unused UA_LIBS variable.
diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm
index b4ed0f5..e2eff1c 100644
--- a/scripts/Dpkg/Changelog.pm
+++ b/scripts/Dpkg/Changelog.pm
@@ -246,8 +246,10 @@ sub __sanity_check_range {
# Handle non-existing versions
my (%versions, @versions);
foreach my $entry (@{$data}) {
- $versions{$entry->get_version()->as_string()} = 1;
- push @versions, $entry->get_version()->as_string();
+ my $version = $entry->get_version();
+ next unless defined $version;
+ $versions{$version->as_string()} = 1;
+ push @versions, $version->as_string();
}
if ((defined($r->{since}) and not exists $versions{$r->{since}})) {
warning(g_("'%s' option specifies non-existing version"), 'since');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list