Re: Depends on -common (= ${Source-Version}) for GNOME packages
Sebastien Bacher <seb128@debian.org> wrote:
[...]
> It would probably be better to adapt depends to have >= Upstream, <<
> Next-Upstream.
[...]
> upstream-version := $(shell dpkg-parsechangelog | sed -n '/^Version:
> [0-9\.]\+-.\+/{s/^Version: \([0-9\.]\+\)-.\+/\1/;p;}')
[...]
> Depends: ... libgnome2-common (>= ${Upstream-Version}), libgnome2-common
> (<< ${Upstream-Version}.1)
Hello,
As this was proposed by me, I feel the need to point out perhaps
problematic issues in my code, before somebody else does. ;-)
The sed-entry will only work with simple 1.3.4-67 version-numbers, while
policy allows letters, dashes and of course an epoch. This might be
better:
upstream-version := $(shell dpkg-parsechangelog | sed -n '/^Version: [[:alnum:]:+\.-]\+-.\+/{s/^Version: \([[:alnum:]:+\.-]\+\)-.\+/\1/;p;})
There are also problems with
Depends: ... (<< ${Upstream-Version}.1)
Assume foo has upstream version 1.2-3 and Debian revision -7. Now try
dpkg --compare-versions '1.2-3-7' '<<' '1.2-3.1' && echo yes
or
dpkg --compare-versions '1.2-3-7' '<<' '1.2-4' && echo yes
I think at least the latter is a bug in dpkg, but this is not very
helpful, I suggest using this instead:
Depends: ... (<< ${Upstream-Version}.0-0)
But please triplecheck yourself, I might have made a stupid error.
cu andreas
Reply to: