Hi!

I've just discovered that even old ports hosted on SourceForge
were switched to the new file distribution scheme (i.e.
MASTER_SITE_SOURCEFORGE_PROJECT). Fetching from old urls result in
redirects, which means that these ports can now only be fetched
from our mirror. So we should switch to SOURECFORGE_PROJECT
immediately.

I've written a simple Perl script ([1]) which uses curl to try to
fetch distfiles for each SourceForge-hosted port from old location,
parses curl output to discover redirect target, gets SUBDIR out of
it and enhances it by substituding ${PORTNAME} and ${PORTVERSION}.
The script doesn't really download distfiles (--max-filesize 1000
option for curl), so it doesn't eat much traffic. However, it eats
some (much!) CPU time due to many make calls. It also runs in 10
threads by default.

The test run results are here: [2]. 

Except for 45 ports for which new URL could not be determined (that
basically means that the don't fetch at all and files were likely
removed), this provides useable MASTER_SITES_SUBDIRs (curl also
produces escaped urls so there's no problem with spaces and other
weird characters) for all SF ports, so we can generate a patch
semi-automatically. I'd like to do it :)

Also note that top 3 subdirs happen to be ([3]):

1018 ${PORTNAME}/${PORTNAME}/${PORTVERSION}
 259 ${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
  72 ${PORTNAME}/OldFiles

thus I'd also change default MASTER_SITE_SUBDIR for SFP to
${PORTNAME}/${PORTNAME}/${PORTVERSION}. This will save us trouble
of caring about subdir for ~30% of SF ports.

Finally, since MASTER_SITE_SOURCEFORGE will no longer be of use,
I'd remove MASTER_SITE_SOURCEFORGE_PROJECT and just use
MASTER_SITE_SOURCEFORGE for the new scheme.

[1] http://people.freebsd.org/~amdmi3/sf.pl.txt
[2] http://people.freebsd.org/~amdmi3/sourceforge-subdirs.txt
[3] http://people.freebsd.org/~amdmi3/sourceforge-subdirs-top.txt

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ru    http://www.amdmi3.ru
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to