[debhelper-devel] [Git][debian/debhelper][master] Dh_Lib.pm: Properly handle packages with version "0"
Niels Thykier
gitlab at salsa.debian.org
Thu Apr 5 19:39:00 UTC 2018
Niels Thykier pushed to branch master at Debian / debhelper
Commits:
bb483360 by Niels Thykier at 2018-04-05T19:36:54+00:00
Dh_Lib.pm: Properly handle packages with version "0"
Signed-off-by: Niels Thykier <niels at thykier.net>
- - - - -
2 changed files:
- debian/changelog
- lib/Debian/Debhelper/Dh_Lib.pm
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ debhelper (11.1.7) UNRELEASED; urgency=medium
* makefile.pm: Use -Oline with make. This avoids make mistaking
a target name for a value for -O and should make build time
outs less likely for "long" targets. (Closes: #894573)
+ * Dh_Lib.pm: Fix bug that make debhelper trip on packages with
+ the version "0". Thanks to Chris Lamb for reporting the bug
+ plus debugging the issue. (Closes: #894895)
[ Nicolas Boulenguez ]
* dh_installxfonts: Fix typo that causes a misc:Depends on
=====================================
lib/Debian/Debhelper/Dh_Lib.pm
=====================================
--- a/lib/Debian/Debhelper/Dh_Lib.pm
+++ b/lib/Debian/Debhelper/Dh_Lib.pm
@@ -907,12 +907,13 @@ sub pkgfilename {
if (not defined($res)) {
error("No changelog entries for $package!? (changelog file: ${isnative_changelog})");
}
- # Get the package version.
- $dh{VERSION} = $res->{'Version'};
- # Did the changelog parse fail?
- if ($dh{VERSION} eq q{}) {
- error("changelog parse failure");
+ my $version = $res->{'Version'};
+ # Do we have a valid version?
+ if (not defined($version) or not $version->is_valid) {
+ error("changelog parse failure; invalid or missing version");
}
+ # Get the package version.
+ $dh{VERSION} = $version->as_string;
# Is this a native Debian package?
if (index($dh{VERSION}, '-') > -1) {
View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/bb48336053662478f55732010c1c8f9b79b8a87a
---
View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/bb48336053662478f55732010c1c8f9b79b8a87a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20180405/f8ee15bc/attachment-0001.html>
More information about the debhelper-devel
mailing list