Bug#674022: dpkg: error: --compare-versions takes three arguments: <version> <relation> <version>
clone 674022 -1
retitle -1 empty dirs are not removed on upgrade due to logic error
severity -1 important
thanks
On Mo, 25 Jun 2012, Anders Kaseorg wrote:
> I still think the logic here is not what was intended. Because of the
> underquoting, [ -n $old_version ] _always_ returns true, so that the
No, it returns true only if an old version is set, that is on upgrades.
> --compare-versions test is now always short-circuited. The apparent
> intention is
> if [ -n "$old_version" ] && dpkg --compare-versions "$old_version" le 2011.20120322-2
> ^^
That is indeed true ... should have been
[ -z $old_version ] || ...
or as you suggested
le-nl
I will fix it before release.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
CRANLEIGH (n.)
A mood of irrational irritation with everyone and everything.
--- Douglas Adams, The Meaning of Liff
Reply to: