Bug#850966: Please support ftp search with version number only in the directory name

Ole Streicher olebole at debian.org
Thu Jan 12 08:52:08 UTC 2017


Hi Ben,

Am 12.01.2017 um 09:22 schrieb Ben Finney:
> Ole Streicher <olebole at debian.org> writes:
> How would you expect this to work?

one way could be: uscan could check the dir

ftp://andromeda.star.bris.ac.uk/pub/star/stilts/

for all dirs matching v([\d\.\-]+),

compare with d/changelog (by using uversionmangle),
search for the most recent version between the newer ones,
then download from that dir the file specified in the second
part (stilts_src.zip), and rename it using fileversionmangle 
(so to v3.0-9.zip in the example).

> You're right. The only information UScan can use, is what information is
> in the response document. It needs a *single* document with *all* the
> relevant versions, as links in the document.

if the second component (the file name) does not contain a
grouped regexp, it could just be added to the directory link
in the first document.

Another way would be to use only one URL:

ftp://andromeda.star.bris.ac.uk/pub/star/stilts/v([\d\.\-]+)/stilts_src.zip

If there is a directory component *after* the grouped regexp, split it into three parts:

* Base URL for directory, ftp://.../star/stilts/
* Regexp for the directory search and version extraction, v([\d\.\-]+)/
* suffix path to add for download, stilts_src.zip

> How would you propose UScan should detect all the relevant versions?
> What URL will respond with a document containing the complete list of
> versioned links?

See above.

Does this make sense?

Best regards

Ole



More information about the devscripts-devel mailing list