On Wed, April 13, 2011 14:59, you wrote:
> In gvfs, I have this watch file:
> version=3
> http://ftp.gnome.org/pub/GNOME/sources/gvfs/([\d\.]+)[02468]/ \
> gvfs-([\d\.]+)\.tar\.gz
>
> And it fails to find the latest upstream... running it in --debug mode
> shows that it selects the wrong directory:

afaics, this is expected behaviour; the issue is that the watchfile is not
specific enough.

> uscan debug: matching pattern
> (?:(?:http://ftp.gnome.org)?\/pub\/GNOME\/sources\/gvfs\/)?([\d\.]+)[02468]
> -- Found the following matching hrefs (newest first):
>      1.0/
>      1.0/
>      1.2/
>      1.2/
>      1.4/
>      1.4/
>      1.6/
>      1.6/
>      1.8/
>      1.8/
>      0.0/
>      0.0/
>      0.2/
>      0.2/
> uscan debug: newest_dir => '1.0'
> uscan debug: requesting URL
> http://ftp.gnome.org/pub/GNOME/sources/gvfs/1.0/

Your watchfile says that the portion of the directory name which is used
for matching is everything _except_ the terminating "[02468]".  This means
that the above list of directories contains "0." several times, and "1."
several times.  uscan is correctly selecting one of the "1." choices, but
precisely which one will depend on the order in which perl chooses to sort
them.

If you change the watchfile to:

version=3
http://ftp.gnome.org/pub/GNOME/sources/gvfs/([\d\.]+[02468])/ \
gvfs-([\d\.]+)\.tar\.gz

then 1.8 is selected as expected.

> But when you look up the "Last modified" timestamp on
> http://ftp.gnome.org/pub/GNOME/sources/gvfs/ you'll see that 1.0 is older
> than 1.8.

The selection is based purely on the version numbers, not how recently any
of the files or directories were modified.

Regards,

Adam





-- 
To unsubscribe, send mail to pkg-devscripts-unsubscr...@teams.debian.net.

Reply via email to