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

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=563fd74ef926b23207d58108071d91b7c8ba2507

commit 563fd74ef926b23207d58108071d91b7c8ba2507
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Jun 14 02:51:24 2018 +0200

    Dpkg::Shlibs::SymbolFile: Always assign proper Dpkg::Version to deprecated
    
    We should always assign a proper Dpkg::Version object to the deprecated
    variable. Otherwise it can get confused with the scalar value 0 used on
    boolean context to denote it is *not* deprecated, instead of it being
    a version number 0.
---
 debian/changelog                  | 4 ++++
 scripts/Dpkg/Shlibs/SymbolFile.pm | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index a5920996b..ab1757193 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -118,6 +118,10 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
       both faster and more portable, as the default tail(1) is not POSIX
       compliant on all systems (c.f. Solaris).
     - Dpkg::Build::Types: Add new set_build_type_from_targets() function.
+    - Dpkg::Shlibs::SymbolFile: Always assign a proper Dpkg::Version to the
+      deprecated variable, otherwise the scalar value 0 can get confused
+      on scalar context to denote it is *not* deprecated instead of being
+      version 0.
   * Documentation:
     - Update gettext minimal version in README.
     - Add a missing dot on the dpkg-buildflags(1) «lfs» feature paragraph.
diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm 
b/scripts/Dpkg/Shlibs/SymbolFile.pm
index b36d542ce..1a165c9d0 100644
--- a/scripts/Dpkg/Shlibs/SymbolFile.pm
+++ b/scripts/Dpkg/Shlibs/SymbolFile.pm
@@ -224,7 +224,7 @@ sub parse {
                error(g_('symbol information must be preceded by a header (file 
%s, line %s)'), $file, $.);
            }
            # Symbol specification
-           my $deprecated = ($1) ? $1 : 0;
+           my $deprecated = ($1) ? Dpkg::Version->new($1) : 0;
            my $sym = _new_symbol($state->{base_symbol}, deprecated => 
$deprecated);
            if ($self->create_symbol($2, base => $sym)) {
                $self->add_symbol($sym, ${$state->{obj_ref}});

-- 
Dpkg.Org's dpkg

Reply via email to