[Debian-zh-dev] Bug#975045: galternatives fails to build for binnmu

Sven Mueller sven.mueller72 at gmail.com
Wed Nov 18 10:36:42 GMT 2020

Package: galternatives
Version: 1.0.7
Tags: patch

debian/rules compares the version from debian/changelog with the version
reported by the INFO dict. However, this fails if a binnmu is at play:

A binnmu adds a changelog entry with +bX (X being an integer), but
generally speaking, rebuilds might add almost any +<whatever> suffixes.

I suggest to change debian/rules as follows to allow for binnmus:


BASE_VERSION=$(shell dpkg-parsechangelog \
      sed -rne 's/^Version: ([0-9.]+)(\+.*)?/\1/p')

And compare to that instead of DEB_VERSION_UPSTREAM

This is similar to what is done for DEB_VERSION_UPSTREAM in pkg-info.mk,
but acknowledges the fact that galternatives is a native Debian package and
thus the whole version from the changelog is recognized as the upstream

For 1.2-1+b1, DEB_VERSION_UPSTREAM would have 1.2, as it strips the last -
and everything after it.

Patch attached, this time I'll refrain from submitting anything to salsa...
I caused too much chaos with the previous commits already (I hope I cleaned
it up though).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/chinese-developers/attachments/20201118/8f6ca3f7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_version_check.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/chinese-developers/attachments/20201118/8f6ca3f7/attachment.bin>

More information about the Chinese-developers mailing list