Bug#958999: igraph: the library and PC metadata report wrong version

2020-04-28 Thread Andreas Tille
Control: tags -1 upstream
Control: forwarded -1 https://github.com/igraph/igraph/issues/1377

Hi Jerome,
thanks a lot for the bug report including a patch.
I forwarded it upstream anyway since I was told there is a
new version at horizont and thus an easy fix can be found there.
Kind regards, Andreas.

PS: Please let me know if the issue is really burning for one of
your applications and I upload with your patch.  Or even do
a team upload / add yourself to Uploaders (very welcome).  I've
added you to Debian Med team proactively in case you want to
do so.

-- 
http://fam-tille.de



Bug#958999: igraph: the library and PC metadata report wrong version

2020-04-27 Thread Jerome Benoit
Source: igraph
Version: 0.8.1+ds-3
Severity: normal
Tags: patch

Dear Maintainer,

it appears that the version tuple encoded in the library
and in the pkg-config metadata is wrong. This can be a
development issue. The provided patch alters the upstream
script that generates on the fly the version tuple.
This patch generates a version tuple based on the verion
of the debian package.
Cheers,
Jerome

-- System Information:
Debian Release: Buster*
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-8-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
--- a/tools/getversion.sh
+++ b/tools/getversion.sh
@@ -1,13 +1,4 @@
 #! /bin/bash
-
-thistag=$(git describe --exact-match --tags HEAD 2>/dev/null || true)
-
-if [ -z "${thistag}" ]; then
-# taghash=$(git rev-list --tags --max-count=1)
-# tag=$(git describe --tags "$taghash")
-next_version=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cat NEXT_VERSION )
-current=$(git rev-parse --short HEAD)
-echo "${next_version}-pre+${current}"
-else
-echo "${thistag}"
-fi
+version_upstream=$(dpkg-parsechangelog -S Version | sed -e 's/+[^+]*$//')
+echo "${version_upstream}"
+exit 0
--- a/tools/getversion.sh
+++ b/tools/getversion.sh
@@ -1,13 +1,4 @@
 #! /bin/bash
-
-thistag=$(git describe --exact-match --tags HEAD 2>/dev/null || true)
-
-if [ -z "${thistag}" ]; then
-# taghash=$(git rev-list --tags --max-count=1)
-# tag=$(git describe --tags "$taghash")
-next_version=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cat NEXT_VERSION )
-current=$(git rev-parse --short HEAD)
-echo "${next_version}-pre+${current}"
-else
-echo "${thistag}"
-fi
+version_upstream=$(dpkg-parsechangelog -S Version | sed -e 's/+[^+]*$//')
+echo "${version_upstream}"
+exit 0