Re: sf.net redirector reports 500 Internal Server Error
On Tue, May 12, 2009 at 02:47:58PM -0500, Raphael Geissert wrote:
> Hi Daniel,
> Daniel Leidert wrote:
> > Hi,
> > When I type the requested URL, say for example
> > http://qa.debian.org/watch/sf.php/docbook-xsl
> > Then an Internal Server Error is reported and the page
> > itself shows:
> > "No mirror could satisfy the request. Please report this
> > message to email@example.com"
> Thanks for reporting, am already aware of it.
> Sourceforge recently made some incompatible changes and there's at the
> moment no workaround.
No workaround ?
> > Using uscan on the command line works.
> Only if it is from devscripts 2.10.31 or greater (lenny was released
> with .35), which is smarter when redirected (required by the only
> sourceforge mirror that keeps the redirector working.)
I understand that using one mirror directly is a temporary approach that should
be replaced by something going via the sourceforge mirror-selection system.
This can be solved for debian/watch files using
http://sf.net/<projectname>/<filenamebase>-(.*)\.tar\.gz and similar, by
enhancing the sf.net redirector with the following algorithm:
- Access http://sourceforge.net/projects/<projectname>
Parse the html to find the value of the group_id.
- Access http://sourceforge.net/project/showfiles.php?group_id=...
Parse the html to find the values of the package_id's.
- For each package_id:
- Access http://sourceforge.net/project/showfiles.php?group_id=...&package_id=...
Parse the html to verify whether it contains files matching
the pattern <filenamebase>-(.*)\.tar\.gz.
- If it does contain files matching, then find the filename with the
highest version number. This is a preliminary result.
- After processing all package_id's, select the preliminary result with the
highest version number. This is the final result.
So far what to do to make the existing debian/watch files continue to work
without depending on the only sf.net mirror that keeps the redirector currently
Later on, a nice-to-have would be support for specifying a package_id in
debian/watch, so that the searching for the newest upstream release can be
limited to only one sf.net package within the sf.net group, instead of all
packages in the group.