As some may know, I'm working on euscan, and currently euscan only use
CPV and SRC_URI to find new upstream versions.
This works well if upstream url and version scheme is sane or if
upstream has an API for that (rubygem, pypi, pecl, pear), but it's far
from optimal.

Debian use a specific file for that: debian/watch and it looks like
that (for media-plugins/vdr-softdevice):

opts=downloadurlmangle=s/prdownload/download/ \
   http://developer.berlios.de/project/showfiles.php?group_id=2051 \
   http://prdownload.berlios.de/softdevice/vdr-softdevice-(.+).tgz

opts specify some options to mangle the final url, and then there is a
list of url to scan. man uscan for more informations.

Currently, if you run euscan on this package, it doesn't work at all:
http://euscan.iksaif.net/package/media-plugins/vdr-softdevice/
1/ it's hosted on gentoo mirrors, and scanning them takes too long
because all files are in the same directory
2/ the url doesn't contain the version

So, to help euscan (and other tools) for some package, I think we
could introduce some hints in metadata.xml. This would extend the
existing "upstream" element:

<upstream>
<version-scan 
downloadurlmangle="s/prdownload/download/">http://developer.berlios.de/project/showfiles.php?group_id=2051
\
   
http://prdownload.berlios.de/softdevice/vdr-softdevice-(.+).tgz</version-scan>
</upstream>

The format is not defined yet, but it would probably look like
debian/watch, that would allow to write a script to import (valid)
debian/watch files into associated metadata.xml when needed.

One other thing, metadata.xml already contain a remote-id tag, which
would be very great to help euscan do its job, but a lot of package
are lacking it:
- Should we patch repoman to scan SRC_URI and issue a warning when it
looks like an URI that match a well known remote-id
- Should we write a script to update metadata.xml ? It would be easy
for rubygem, pypi and pear packages.

Any comment ? Objections ? Ideas ?

Thanks,

-- 
Corentin Chary
http://xf.iksaif.net

Reply via email to