Bug#963083: equivs-build ignores package Version "0"

Denis Thulin denis.thulin at enyx.fr
Thu Jun 18 17:58:01 BST 2020


Package: equivs
Version: 2.2.0
Severity: normal
Tags: patch upstream


Dear Maintainer,

While using mk-build-deps, I've encountered a small inconsistency
between with equivs-build that results in an annoying bug:

When passing the `Version` field to equivs-build with value `0`,
equivs-build ignores that value and decides that the version should be
`1.0`.

mk-build-deps then fails because the generated package version is not
the one it expected.

The reason for that is the following line in equivs-build:
$version = $control->{'Version'} || "1.0";

https://salsa.debian.org/perl-team/modules/packages/equivs/-/blob/master/usr/bin/equivs-build#L341

This line is supposed to guard againts undefined version but has the
side effect of rejecting version 0.

Cheers,

- Denis


-- System Information:
Debian Release: 10.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-88-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages equivs depends on:
ii  debhelper  12.1.1
ii  dpkg-dev   1.19.7
ii  fakeroot   1.23-1
ii  make       4.2.1-1.2
ii  perl       5.28.1-6

equivs recommends no packages.

equivs suggests no packages.

-- no debconf information
-------------- next part --------------
--- a/usr/bin/equivs-build	2020-06-18 16:36:22.365024021 +0000
+++ b/usr/bin/equivs-build	2020-06-18 16:37:34.112880449 +0000
@@ -336,7 +336,10 @@
   my ($builddir, $control) = @_;
   my ($version, $suite, $date);
 
-  $version = $control->{'Version'} || "1.0";
+  my $version = '1.0';
+  if (defined $control->{'Version'}) {
+      $version = $control->{'Version'};
+  }
   $suite = $control->{'Suite'} || "unstable";
   chomp ($date = qx(date -R));
 


More information about the pkg-perl-maintainers mailing list