[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with uscan

Erik de Castro Lopo <mle+debian@mega-nerd.com> writes:

>    http://zhevny.com/specimen/files/specimen-0.5.2-rc3.tar.gz

Okay. The current list at <URL:http://zhevny.com/specimen/files/> shows
the following tarball files:


I will work on the assumption that there will, in future, be a
‘specimen-0.5.2.tar.gz’ and that the intended meaning will be for that
to be *later* than all the above.

As it stands, though, ‘0.5.2’ will always compare earlier than
‘0.5.2ANYTHINGATALL’, the opposite of what your upstream apparently
wants; which is why special keywords in version strings throw a spanner
in the works.

But the clever Debian folks have come up with a reasonably sane way to
accomodate weird upstream version-comparison perversions. That is done
with an exception to the comparisons, using the tilde ‘~’ (see Debian
policy §5.6.12. for the details).

So you'll need to mangle the upstream version string into a version
string that will actually compare the way upstream expects it to:

    # debian/watch
    # Debian uscan file for ‘libspecimen’ package.
    # Manpage: uscan(1)

    # Compulsory line, this is a version 3 file.

    # Current version from Cheese Shop.
    opts="uversionmangle=s/-([a-z]+\d+)$/~$1/" \

Using that watch file, I get the following result:

    $ uscan --package libspecimen --upstream-version 0.5.1 --watchfile watch 
    libspecimen: Newer version (0.5.2~rc3) available on remote site:
      (local version is 0.5.1)
    Not downloading as --package was used.  Use --download to force

Hope that helps.

 \         “Giving every man a vote has no more made men wise and free |
  `\          than Christianity has made them good.” —Henry L. Mencken |
_o__)                                                                  |
Ben Finney

Reply to: