Package: gdb
Severity: important

it is wrong to encode the distro name into the version field. This breaks code
which tries to parse the version information (independent if such code is good
or bad code). Instead the package should be configured with the option
--with-pkgversion which exists for exactly this reason.

diff -Nru gdb-7.7/debian/rules gdb-7.7/debian/rules
--- gdb-7.7/debian/rules        2013-12-18 10:01:01.000000000 +0000
+++ gdb-7.7/debian/rules        2014-02-08 16:11:28.000000000 +0000
@@ -89,6 +89,9 @@
 endif
 endif

+distribution := $(shell lsb_release -is)
+deb_version := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
+
 BUILDDIRMULTIARCH = $(ALL_BUILDDIR)/objdir-multiarch

 run_tests := yes
@@ -123,6 +126,7 @@
 # causes a harmless, but ugly, testsuite failure in maint.exp.
 EXTRA_FLAGS := --disable-gdbtk --disable-shared \
        --disable-werror \
+       --with-pkgversion='$(distribution) $(deb_version)' \
        --srcdir=$(shell pwd) --with-system-readline --with-expat \
        $(arch_config_args) --build=$(DEB_BUILD_GNU_TYPE)

@@ -184,17 +188,10 @@
 endif

 DEB_MAKE_BUILD_TARGET = $(NJOBS) all
-distribution := $(shell lsb_release -is | tr A-Z a-z)

 BUILDDIRSOURCE := $(ALL_BUILDDIR)/gdb
 BUILDDIRMIN := $(ALL_BUILDDIR)/gdb-minimal

-post-patches::
-       if ! test -f gdb/version.in.backup; then \
-         mv -f gdb/version.in gdb/version.in.backup; \
-         sed -e 's/$$/-$(distribution)/' < gdb/version.in.backup > 
gdb/version.in; \
-       fi
-
 # This should probably be common-post-build-arch, but that runs during
 # install, under fakeroot, in CDBS 0.4.21.
 build/gdb$(TS):: check-stamp


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to