#1142382 lcov: Installed lcov-2.4 present itself as 2.0

#1142382#5
Date:
2026-07-19 00:51:52 UTC
From:
To:
Dear Maintainer,

I spotted this bug using Ubuntu 26.04 but after browsing Ubuntu and Debian packages I believe the source of the problem is in Debian. I was able to confirm it also in Debian. For both, I use docker:
docker run -it ubuntu:26.04
docker run -ir debian:forky

I install lcov and the apt reports to install version 2.4-3, it is also visible in the package search engine for both Debian and Ubuntu.

But calling lcov --version shows on both:
$ lcov --version
lcov: LCOV version 2.0-1

and also:
$ dpkg-query -W lcov
lcov    2.4-3

On my Gentoo with lcov-2.4 it displays properly 2.4:
$ lcov --version
lcov: LCOV version 2.4-0

When I downloaded the sources from lcov github page, .version file shows:
VERSION=2.4
RELEASE=0

but for the one downloaded from Debian Search Package engine (lcov-2.4.orig.tar.gz), which seems to be repacked (I don't use Debian daily and don't know in details what is happening with source packages), it shows:
VERSION=1.14
RELEASE=1
FULL=1.14

which is even more confusing, why 1.14 and not 2.0.

For the original lcov-1.14 package from github, it indeed shows:
VERSION=1.14
RELEASE=1
FULL=1.14

But files size, Makefile, in the sources between upstream sources and Debian sources do not match between 1.14, 2.0, 2.4.

Also, this:
grep "our \$VERSION" /usr/lib/lcov/lcovutil.pm
our $VERSION   = "2.0-1";


It is all confusing. Can it be that when the sources were repacked (are they repacked?) were somehow messed?

Regards,
Rafał

#1142382#10
Date:
2026-10-03 19:23:57 UTC
From:
To:
Dear Maintainer, Rafał,

I see this in Trixie also (which dpkg claims to be 2.3.1-1 but lcov
--version says 2.0-1), and I believe it's caused by a Debian patch:
https://sources.debian.org/src/lcov/2.3.1-1/debian/patches/version.patch
this apparently was installed way back when -- apparently version 2.0
had a bug that made it present itself as 1.14, and this patch was needed
to fix that.

The version in forky and sid has a completely new patch file,
https://sources.debian.org/src/lcov/2.5-2/debian/patches/version.patch

I wonder if the packager just forgot to remove the file in Trixie.
I think a 2.3.1-2 with a fixed version string (presumably just remove
the patch file from the packaging files) would be a good thing to have.

Kind regards,