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

Re: Need help writing watch file for unusual, troublesome case.

On Tue, 2 Sep 2008 14:25:04 -0700
"Daniel Moerner" <dmoerner@gmail.com> wrote:

> I think your approach to the debian/watch file is sort of off, which
> explains why it isn't working.  You want to point it to a webpage
> where it can get hrefs that match the given regular expression, so you
> want the website to actually be specified as download_stable.shtml.
> Something like this basically works and can be fine-tuned with a
> better match for the source package:
> version=3
> http://www.xevil.com/xevil/dev/2.02r2/download_stable.shtml \
>        (.*)\.zip
> This complains about the version name but at least works:
> -- Scanning for watchfiles in .
> -- Found watchfile in ./debian
> -- In debian/watch, processing watchfile line:
>   http://www.xevil.com/xevil/dev/2.02r2/download_stable.shtml
> (.*)\.zip -- Found the following matching hrefs:
>     http://www.xevil.com/download/stable/xevilsrc2.02r2.zip
> dpkg: version 'http://www.xevil.com/download/stable/xevilsrc2.02r2'
> has bad syntax: epoch in version is not number
> Newest version on remote site is
> http://www.xevil.com/download/stable/xevilsrc2.02r2, local version is
> 2.02r2
> dpkg: version 'http://www.xevil.com/download/stable/xevilsrc2.02r2'
> has bad syntax: epoch in version is not number
>  => Newer version available from
>    http://www.xevil.com/download/stable/xevilsrc2.02r2.zip
> -- Downloading updated package xevilsrc2.02r2.zip
> -- Successfully downloaded updated package xevilsrc2.02r2.zip
> -- Scan finished
> Cheers,
> Daniel Moerner

The watch file you suggest has more problems than you noticed.
1) Did you notice how your watch line actually includes the current
version number? 2.02r2? That won't work for (hypothetical) future
2) uscan complains about the version name because it is wrong. We can
fix it by using this line instead:
http://www.xevil.com/xevil/dev/2.02r2/download_stable.shtml \
http://www.xevil.com/download/stable/xevilsrc(.*).zip Unfortunately,
this "fix" still has the problem of the current version number (2.02r2)
being in the watch file.

The whole reason I'm trouble is because you have to download
http://www.xevil.com/xevil/dev/download.html in order to know what the
latest version is, and the xevil source archive is not mentioned on
that page.

This would be an easy problem to solve with a script. It would just be
a few lines, and not much hassle. Unfortunately, watch files, being very
simple, seem to be completely unable to solve the partiular instance
where both of the following are true (such as in this case)
1) Directory listings on upstream server are forbidden
2) Source archive is not mentioned in href on page where you find out
the latest version number

I think this problem may be unsolvable, short of creating a new watch
file format (version 4).


Attachment: signature.asc
Description: PGP signature

Reply to: