[Dehs-devel] Link to directory containing new upstream tarball

Willi Mann willi at wm1.at
Sun Aug 8 19:00:06 UTC 2010


Hi!

Am 2010-08-08 18:11, schrieb Raphael Geissert:
> Hi,
> 
> On Sunday 08 August 2010 03:24:16 Willi Mann wrote:
>> Hi!
>>
>> Could you add a link to the directory containing the upstream tarball,
>> please?
> 
> It can't be done.
> 
> The link is obtained from the watch file's rule and DEHS has no control over it 
> at all. The URL can be of any form, either a specific file on a directory (like 
> the example you gave,) or a URL to a cgi or some other page that redirects you 
> to the final file.

But if you strip the "file name" (all characters after the last slash)
from the URL, you will probably be correct in most cases. The link could
be named "directory (guessed)", written with smaller font size.

If you think this is not enough, the URL could be fetched and checked
whether
- it is an FTP site or
- (it is HTML and
- contains the file name as text, linking to the original URL given).

Only directory URLs fulfilling this condition should then be shown.

Alternatively, to avoid fetching remote data, printing the directory
link could be limited to URLs with "file names" that match a specific
form. As a start:

^[\w-.]+\.(tar\.gz|tar\.bz2|tgz|zip)$

Of course, this method does not guarantee to avoid all possible wrong
directory links, but I guess the number of them would really be low.

And yes, I'm willing to code and test this if you tell me which way you
prefer.

WM



More information about the Dehs-devel mailing list