- Update to match the 5.3-RELEASE/5-STABLE/6-CURRENT world.

- Handle that 6.0 also uses .tbz packages.
- Simply refer to the -STABLE/-CURRENT branches by their major number
  so we don't have to update that part of the script for each release.
- 5-STABLE currently points to packages-5-current since there is no
  packages-5-stable yet.
- Change the default version to 5-STABLE/i386.
This commit is contained in:
Simon L. B. Nielsen 2004-11-09 15:15:01 +00:00
parent e33b9fe32d
commit a72d0992f3
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=22898

View file

@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
# #
# $FreeBSD: www/en/cgi/ports.cgi,v 1.78 2004/08/30 19:11:31 ceri Exp $ # $FreeBSD: www/en/cgi/ports.cgi,v 1.79 2004/09/11 08:31:02 dd Exp $
# #
# ports.cgi - search engine for FreeBSD ports # ports.cgi - search engine for FreeBSD ports
# o search for a port by name or description # o search for a port by name or description
@ -67,40 +67,42 @@ sub init_variables {
local($pia64) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ia64'; local($pia64) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ia64';
local($psparc64) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/sparc64'; local($psparc64) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/sparc64';
$remotePrefixFtpPackagesDefault = '4.10-STABLE/i386'; $remotePrefixFtpPackagesDefault = '5-STABLE/i386';
%remotePrefixFtpPackages = %remotePrefixFtpPackages =
( (
'5.2-CURRENT/i386', "$p/packages-current/All", '6-CURRENT/i386', "$p/packages-6-current/All",
'4.10-STABLE/i386', " $p/packages-4-stable/All", '5-STABLE/i386', " $p/packages-5-current/All",
'4-STABLE/i386', " $p/packages-4-stable/All",
'5.3-RELEASE/i386', "$p/packages-5.3-release/All",
'5.2.1-RELEASE/i386', "$p/packages-5.2.1-release/All", '5.2.1-RELEASE/i386', "$p/packages-5.2.1-release/All",
'5.1-RELEASE/i386', "$p/packages-5.1-release/All",
'4.10-RELEASE/i386',"$p/packages-4.10-release/All", '4.10-RELEASE/i386',"$p/packages-4.10-release/All",
'4.9-RELEASE/i386', "$p/packages-4.9-release/All",
'4.8-RELEASE/i386', "$p/packages-4.8-release/All",
'5.2-CURRENT/alpha', "$palpha/packages-current/All", '6-CURRENT/alpha', "$palpha/packages-6-current/All",
'4.10-STABLE/alpha', "$palpha/packages-4-stable/All", '5-STABLE/alpha', "$palpha/packages-5-current/All",
'4-STABLE/alpha', "$palpha/packages-4-stable/All",
'5.3-RELEASE/alpha', "$palpha/packages-5.3-release/All",
'5.2.1-RELEASE/alpha', "$palpha/packages-5.2.1-release/All", '5.2.1-RELEASE/alpha', "$palpha/packages-5.2.1-release/All",
'5.1-RELEASE/alpha', "$palpha/packages-5.1-release/All",
'4.10-RELEASE/alpha',"$palpha/packages-4.10-release/All", '4.10-RELEASE/alpha',"$palpha/packages-4.10-release/All",
'4.9-RELEASE/alpha', "$palpha/packages-4.9-release/All",
'4.8-RELEASE/alpha', "$palpha/packages-4.8-release/All",
'5.2-CURRENT/amd64', "$pamd64/packages-current/All", '6-CURRENT/amd64', "$pamd64/packages-6-current/All",
'5-STABLE/amd64', "$pamd64/packages-5-current/All",
'5.3-RELEASE/amd64', "$pamd64/packages-5.3-release/All",
'5.2.1-RELEASE/amd64', "$pamd64/packages-5.2.1-release/All", '5.2.1-RELEASE/amd64', "$pamd64/packages-5.2.1-release/All",
'5.2-CURRENT/ia64', "$pia64/packages-current/All", '6-CURRENT/ia64', "$pia64/packages-6-current/All",
'5-STABLE/ia64', "$pia64/packages-5-current/All",
'5.3-RELEASE/ia64', "$pia64/packages-5.3-release/All",
'5.2.1-RELEASE/ia64', "$pia64/packages-5.2.1-release/All", '5.2.1-RELEASE/ia64', "$pia64/packages-5.2.1-release/All",
'5.1-RELEASE/ia64', "$pia64/packages-5.1-release/All",
'5.2-CURRENT/sparc64', "$psparc64/packages-current/All", '6-CURRENT/sparc64', "$psparc64/packages-6-current/All",
'5-STABLE/sparc64', "$psparc64/packages-5-current/All",
'5.3-RELEASE/sparc64', "$psparc64/packages-5.3-release/All",
'5.2.1-RELEASE/sparc64', "$psparc64/packages-5.2.1-release/All", '5.2.1-RELEASE/sparc64', "$psparc64/packages-5.2.1-release/All",
'5.1-RELEASE/sparc64', "$psparc64/packages-5.1-release/All",
); );
$remotePrefixHtml = $remotePrefixHtml =
@ -147,7 +149,11 @@ sub init_variables {
# Parse selected version string and set version dependend settings # Parse selected version string and set version dependend settings
sub parse_release { sub parse_release {
if($release =~ /^(\d+)\.(\d+)(\.(\d+))?-(CURRENT|STABLE|RELEASE)\/(i386|alpha|ia64|sparc64|amd64)$/) { if($release =~ /^(\d+)-(CURRENT|STABLE)\/(i386|alpha|ia64|sparc64|amd64)$/) {
$release_major = $1;
$release_type = $2;
$release_arch = $3;
} elsif($release =~ /^(\d+)\.(\d+)(\.(\d+))?-(CURRENT|STABLE|RELEASE)\/(i386|alpha|ia64|sparc64|amd64)$/) {
$release_major = $1; $release_major = $1;
$release_minor = $2; $release_minor = $2;
$release_patch = $4; $release_patch = $4;
@ -166,7 +172,7 @@ sub parse_release {
&footer; &footer2; &exit(0); &footer; &footer2; &exit(0);
} }
if($release_major == 5) { if($release_major > 4) {
$packageExt = 'tbz'; $packageExt = 'tbz';
$ports_database = 'INDEX-5'; $ports_database = 'INDEX-5';
} }
@ -662,7 +668,7 @@ sub footer {
<img ALIGN="RIGHT" src="/gifs/powerlogo.gif" alt="Powered by FreeBSD"> <img ALIGN="RIGHT" src="/gifs/powerlogo.gif" alt="Powered by FreeBSD">
&copy; 1996-2002 by Wolfram Schneider. All rights reserved.<br> &copy; 1996-2002 by Wolfram Schneider. All rights reserved.<br>
}; };
#print q{$FreeBSD: www/en/cgi/ports.cgi,v 1.78 2004/08/30 19:11:31 ceri Exp $} . "<br>\n"; #print q{$FreeBSD: www/en/cgi/ports.cgi,v 1.79 2004/09/11 08:31:02 dd Exp $} . "<br>\n";
print qq{Please direct questions about this service to print qq{Please direct questions about this service to
<I><A HREF="$mailtoURL">$mailto</A></I><br>\n}; <I><A HREF="$mailtoURL">$mailto</A></I><br>\n};
print qq{General questions about FreeBSD ports should be sent to } . print qq{General questions about FreeBSD ports should be sent to } .