Fix currency and cleanup

Fix currency for upstream changes for
Python
psmisc

Add currency for
lz

Remove a lot of old commented code.
This commit is contained in:
Bruce Dubbs 2024-03-20 09:46:44 -05:00
parent 3d50ab19d0
commit c3a956946d

View File

@ -77,6 +77,7 @@ function http_get_file( $url )
}
if ( preg_match( "/sourceforge/", $url ) ||
preg_match( "/python/", $url ) ||
preg_match( "/psmisc/", $url ) )
{
exec( "lynx -dump $url 2>/dev/null", $lines );
@ -134,6 +135,7 @@ if ( $package == "iana-etc" ) $dirpath = github("Mic92/iana-etc");
if ( $package == "intltool" ) $dirpath = "https://launchpad.net/intltool/trunk";
if ( $package == "libffi" ) $dirpath = github("libffi/libffi");
if ( $package == "libxcrypt" ) $dirpath = github("besser82/libxcrypt");
if ( $package == "lz" ) $dirpath = github("lz4/lz4");
if ( $package == "meson" ) $dirpath = github("mesonbuild/meson");
if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc";
if ( $package == "mpfr" ) $dirpath = "https://mpfr.loria.fr/mpfr-current";
@ -160,53 +162,6 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd");
if ( preg_match( "/^ftp/", $dirpath ) )
{
echo "ftp should not occur\n";
/*
$dirpath = substr( $dirpath, 6 ); // Remove ftp://
$dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash
$position = strpos( $dirpath, "/" ); // Divide at first slash
$server = substr( $dirpath, 0, $position );
$path = substr( $dirpath, $position );
$conn = ftp_connect( $server );
ftp_login( $conn, "anonymous", "" );
// See if we need special handling
if ( isset( $exceptions[ $package ] ) )
{
$specials = explode( ":", $exceptions[ $package ] );
foreach ( $specials as $i )
{
list( $op, $regexp ) = explode( "=", $i );
switch ($op)
{
case "UPDIR":
// Remove last dir from $path
$position = strrpos( $path, "/" );
$path = substr( $path, 0, $position );
// Get dir listing
$lines = ftp_rawlist ($conn, $path);
$max = find_max( $lines, $regexp, $regexp );
break;
case "DOWNDIR":
// Append found directory
$path .= "/$max";
break;
default:
echo "Error in specials array for $package\n";
return -5;
break;
}
}
}
$lines = ftp_rawlist ($conn, $path);
ftp_close( $conn );
*/
}
else // http(s)
{
@ -303,7 +258,7 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd");
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" );
if ( $package == "psmisc" )
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+).tar.*$/" );
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" );
if ( $package == "grub" )
return find_max( $lines, "/grub/", "/^.*grub-([\d\.]+).tar.xz.*$/" );
@ -311,11 +266,14 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd");
if ( $package == "Jinja" )
return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" );
if ( $package == "lz" )
return find_max( $lines, "/name.:/", '/^.*LZ4 v([\d\.]+)".*$/' );
if ( $package == "openssl" )
return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" );
if ( $package == "Python" )
return find_max( $lines, "/Python 3/", "/^.*Python (3[\d\]*\d) .*$/" );
return find_max( $lines, "/Python 3/", "/^.*Python (3[\d\.]*\d) .*$/" );
if ( $package == "vim" )
return find_max( $lines, "/v\d\./", "/^.*v([\d\.]+).*$/" );
@ -335,7 +293,6 @@ function get_current()
// Fetech from git and get wget-list
$current = array();
#$lfssvn = "svn://svn.linuxfromscratch.org/LFS/trunk";
$lfsgit = "https://git.linuxfromscratch.org/lfs.git";
$tmpdir = exec( "mktemp -d /tmp/lfscheck.XXXXXX" );
@ -367,7 +324,6 @@ function get_current()
$file = rtrim( $file );
$pkg_pattern = "/(\D*).*/";
//$pattern = "/\D*(\d.*\d)\D*/";
$pattern = "/\D*(\d.*\d)\D*/";
if ( preg_match( "/e2fsprogs/", $file ) )