Re: watch file syntax
Ole Streicher <email@example.com> writes:
> | Normally with a watch file, the URL at http://sf.net/gentoo is
> in my case, this is http://trac.assembla.com/astrolib
> | downloaded and searched for links of the form <a href=...>. The
> | basename (just the part after the final /) of each linked URL is
> | compared against the Perl regular expression pattern (see perlre(1))
> | gentoo-(.+)\.tar\.gz. Out of the files that match, the one with the
> in my case, this is pywcs-(.+)-.+\.tar\.gz
Contrary to maint-guide's claim, the pattern needs to match the entire
contents of the href="..." attribute:
The pattern (after the final slash) is a Perl regexp (see perlre(1)
for details of these). You need to make the pattern so tight that it
matches only the upstream software you are interested in and nothing
else. Also, the pattern will be anchored at the beginning and at the
end, so it must match the full filename.
Please file a bug against maint-guide.
> | greatest version number is downloaded and the uupdate program is run
> | to create an updated source tree.
> However, "uscan" always tells me "no matching hrefs for watch line"?
> What do I wrong here, and how could the problems be solved?
If you want to match just the basename of the href, you can use a
pattern like ".*/name-(.*)\.tar\.gz" if you know that there is a full
URL, or better still: "(?:.*/)?name-(.*)\.tar\.gz" if there may or may
not be. Note the use of (?:...) to avoid making a backreference.
You need to split URL and pattern in two fields for this to work.