diff options
author | Guillem Jover <guillem@debian.org> | 2018-04-08 22:43:09 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2018-05-04 04:39:28 +0200 |
commit | 981a18c37036b68f368b0bfab71d2a984abba9e6 (patch) | |
tree | ec082042e04e7a20ea65eb7fe278f5d701cf1247 /t | |
parent | fd8f838450ab89e3011c1a48061e0247d205ea96 (diff) | |
download | dpkg-981a18c37036b68f368b0bfab71d2a984abba9e6.tar.gz |
Dpkg::Version: Fix bool overload behavior
The current bool overload has broken semantics, because it considers the
version "0" to be false.
The bool overload used to have sane semantics (equivalent to is_valid())
before commit 5b9f353b2940de751df47036608afbe71992d622, but there it got
changed to return the stringified version if it was valid, or undef
otherwise, to fix a problem within dpkg-shlibdeps, instead of properly
fixing the local-only problem in the tool. This makes the overload hard
to use, and broke existing callers from external projects.
We will emit a warning until dpkg 1.20.x to notify of the semantic change
in case there is code relying on the broken semantics. For fixed code the
warning can then be quiesced with:
no warnings qw(Dpkg::Version::semantic_change::overload::bool);
Closes: #895004
Diffstat (limited to 't')
-rw-r--r-- | t/pod-spell.t | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/pod-spell.t b/t/pod-spell.t index 6d3f7ffc9..111d592ca 100644 --- a/t/pod-spell.t +++ b/t/pod-spell.t @@ -83,6 +83,7 @@ modelines multiarch nocheck qa +quiesced reportfile rfc822 sig |