On Sat, Jan 18, 2014 at 04:35:14PM +0100, Ludovic Courtès wrote: > And what do we do for URIs in http:// or mirror://?
What is the particular problem? For ffmpeg, for instance, the uri reads (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-" version ".tar.bz2")) which gets expanded into "http://www.ffmpeg.org/releases/ffmpeg-2.1.1.tar.bz2". One could try the following: - Remove potentially trailing ".bz2" (to remove digits). - Look for a regular expression "([:digits:].)*["digits:]". If there is only one, this is likely to be the version; try "++" everywhere (in a way that would give "2.1.2", "2.2.0", "3.0.0" in our case, and maybe the same ones without the trailing ".0"); replace them in the string and check whether they exist. If the regular expression is found more than once, there is a good chance that the previous occurrence is the version once again, or a truncation of it, as in http://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.xz There is no need to obtain the full list of files in a directory if one can reasonably guess the paths for the next release (and if one does not guess correctly, then the update fails, but not worse than now (assuming that the download server returns a meaningful response when trying to access a non- existing file, instead of an html page printing "404"...)). Andreas