mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-31 11:21:59 +00:00
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:
parent
3d50ab19d0
commit
c3a956946d
@ -77,6 +77,7 @@ function http_get_file( $url )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( preg_match( "/sourceforge/", $url ) ||
|
if ( preg_match( "/sourceforge/", $url ) ||
|
||||||
|
preg_match( "/python/", $url ) ||
|
||||||
preg_match( "/psmisc/", $url ) )
|
preg_match( "/psmisc/", $url ) )
|
||||||
{
|
{
|
||||||
exec( "lynx -dump $url 2>/dev/null", $lines );
|
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 == "intltool" ) $dirpath = "https://launchpad.net/intltool/trunk";
|
||||||
if ( $package == "libffi" ) $dirpath = github("libffi/libffi");
|
if ( $package == "libffi" ) $dirpath = github("libffi/libffi");
|
||||||
if ( $package == "libxcrypt" ) $dirpath = github("besser82/libxcrypt");
|
if ( $package == "libxcrypt" ) $dirpath = github("besser82/libxcrypt");
|
||||||
|
if ( $package == "lz" ) $dirpath = github("lz4/lz4");
|
||||||
if ( $package == "meson" ) $dirpath = github("mesonbuild/meson");
|
if ( $package == "meson" ) $dirpath = github("mesonbuild/meson");
|
||||||
if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc";
|
if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc";
|
||||||
if ( $package == "mpfr" ) $dirpath = "https://mpfr.loria.fr/mpfr-current";
|
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 ) )
|
if ( preg_match( "/^ftp/", $dirpath ) )
|
||||||
{
|
{
|
||||||
echo "ftp should not occur\n";
|
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)
|
else // http(s)
|
||||||
{
|
{
|
||||||
@ -303,7 +258,7 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd");
|
|||||||
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" );
|
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" );
|
||||||
|
|
||||||
if ( $package == "psmisc" )
|
if ( $package == "psmisc" )
|
||||||
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+).tar.*$/" );
|
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" );
|
||||||
|
|
||||||
if ( $package == "grub" )
|
if ( $package == "grub" )
|
||||||
return find_max( $lines, "/grub/", "/^.*grub-([\d\.]+).tar.xz.*$/" );
|
return find_max( $lines, "/grub/", "/^.*grub-([\d\.]+).tar.xz.*$/" );
|
||||||
@ -311,11 +266,14 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd");
|
|||||||
if ( $package == "Jinja" )
|
if ( $package == "Jinja" )
|
||||||
return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" );
|
return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" );
|
||||||
|
|
||||||
|
if ( $package == "lz" )
|
||||||
|
return find_max( $lines, "/name.:/", '/^.*LZ4 v([\d\.]+)".*$/' );
|
||||||
|
|
||||||
if ( $package == "openssl" )
|
if ( $package == "openssl" )
|
||||||
return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" );
|
return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" );
|
||||||
|
|
||||||
if ( $package == "Python" )
|
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" )
|
if ( $package == "vim" )
|
||||||
return find_max( $lines, "/v\d\./", "/^.*v([\d\.]+).*$/" );
|
return find_max( $lines, "/v\d\./", "/^.*v([\d\.]+).*$/" );
|
||||||
@ -335,7 +293,6 @@ function get_current()
|
|||||||
|
|
||||||
// Fetech from git and get wget-list
|
// Fetech from git and get wget-list
|
||||||
$current = array();
|
$current = array();
|
||||||
#$lfssvn = "svn://svn.linuxfromscratch.org/LFS/trunk";
|
|
||||||
$lfsgit = "https://git.linuxfromscratch.org/lfs.git";
|
$lfsgit = "https://git.linuxfromscratch.org/lfs.git";
|
||||||
|
|
||||||
$tmpdir = exec( "mktemp -d /tmp/lfscheck.XXXXXX" );
|
$tmpdir = exec( "mktemp -d /tmp/lfscheck.XXXXXX" );
|
||||||
@ -367,7 +324,6 @@ function get_current()
|
|||||||
|
|
||||||
$file = rtrim( $file );
|
$file = rtrim( $file );
|
||||||
$pkg_pattern = "/(\D*).*/";
|
$pkg_pattern = "/(\D*).*/";
|
||||||
//$pattern = "/\D*(\d.*\d)\D*/";
|
|
||||||
$pattern = "/\D*(\d.*\d)\D*/";
|
$pattern = "/\D*(\d.*\d)\D*/";
|
||||||
|
|
||||||
if ( preg_match( "/e2fsprogs/", $file ) )
|
if ( preg_match( "/e2fsprogs/", $file ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user