clone 597617 -1 reassign -1 libdpkg-perl 1.15.6 retitle -1 Dpkg::Version compares versions differently than dpkg severity -1 normal thanks
2010/9/21 Martin-Éric Racine <[email protected]>: > On Tue, Sep 21, 2010 at 4:52 PM, James Vega <[email protected]> wrote: >> 2010/9/21 Martin-Éric Racine <[email protected]>: >>> On Tue, Sep 21, 2010 at 4:33 PM, James Vega <[email protected]> wrote: >>>> 2010/9/21 Martin-Éric Racine <[email protected]>: >>>>> $ uscan --verbose --rename >>>>> - -- Scanning for watchfiles in . >>>>> - -- Found watchfile in ./debian >>>>> - -- In debian/watch, processing watchfile line: >>>>> http://sf.net/openoffice-lv/lv_LV(.*)\.zip debian uupdate >>>>> [...] >>>>> Newest version on remote site is -0.9.3, local version is 0.9.1 >>>>> => remote site does not even have current version >>>> >>>> $ dpkg --compare-versions -- '-0.9.3' gt '0.9.1' || echo "no" >>>> no >>>> >>>> The version regex in your watch file is capturing too much (the leading >>>> '-'). Changing "http://sf.net/openoffice-lv/lv_LV(.*)\.zip" to >>>> "http://sf.net/openoffice-lv/lv_LV-+([0-9.]+)\.zip" will fix it. Adjust >>>> accordingly if you also want to match versions like 0.5.rc2. >>> >>> Why was the current recipe working fine until now, then? This is the >>> very first time that it barfs. Something must have changed in the way >>> uupdate or uscan work since we pushed 0.9.1. >>> >> >> Actually, your watch file changed. In 0.9.1, you were using >> "http://sf.net/openoffice-lv/lv_LV-(.*)\.zip" so the '-' was counted as >> part of the version string. > > This only failed now, too. It reported 0.6.5 as the newest version. No, it reported "-0.6.5" as the newest version and it's doing that because the regex used in 0.9.1's watch file isn't correct either. Upstream has a tarball named "lv_LV--0.6.5.zip" (notice the two hyphens). As I mentioned earlier, you should be using "http://sf.net/openoffice-lv/lv_LV-+([0-9.]+)\.zip" (or with a slight change to the "[0-9.]" portion to match pre-releases) in the watch file. That will actually handle the file listing appropriately. You are right that there has been a change in behavior in uscan, and that's due to switching from directly invoking «dpkg --compare-versions» to using the Dpkg::Version Perl module. $ dpkg -D1 --compare-versions -- '-0.6.5' lt '0.9.1' && echo "lower" D000001: cmpversions a=`0:-0.6.5' b=`0:0.9.1' r=-302 lower $ perl -MDpkg::Version -e 'if (version_compare_relation("-0.6.5", REL_LT, "0.9.1")) { print "lower\n"; }' $ So, the Perl module does not treat "-0.6.5" as << "0.9.1" but dpkg does. As such, I'm cloning this bug against libdpkg-perl. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]> -- To unsubscribe, send mail to [email protected].
