From 829bbf2c777572f10f98ce3f28aa86e337f6a2fd Mon Sep 17 00:00:00 2001 From: filip Date: Sat, 10 Jan 2026 23:22:59 +0100 Subject: update for mga10 and fix helper for DL cache lists --- lib/Downloads.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Downloads.php b/lib/Downloads.php index 69a0e38ad..989930608 100644 --- a/lib/Downloads.php +++ b/lib/Downloads.php @@ -29,7 +29,7 @@ class Downloads { if ($ua == '') return array( - 'arch' => 'i586', + 'arch' => 'i686', 'system' => 'unknown', 'locale' => 'en', 'browser' => null @@ -54,7 +54,7 @@ class Downloads $locale = $r; } - $arch = 'i586'; + $arch = 'i686'; if (strpos($ua, 'x86_64') !== false) $arch = 'x86_64'; @@ -155,7 +155,7 @@ class Downloads require $cache_file; } else { - $data = file('http://mirrors.mageia.org/api/mageia.9.i586.list'); + $data = file('http://mirrors.mageia.org/api/mageia.10.i686.list'); $mirrors = array(); $num_up = 0; $num_dn = 0; @@ -170,9 +170,9 @@ class Downloads } $num_of_all_mirrs = count($data); $num_of_tested_mirrs = 0; - $common_patern = '/distrib/8/i586'; $common_patern = '/distrib/9/i586'; - //~ $common_patern = '/distrib/cauldron/i586'; + $common_patern = '/distrib/10/i686'; + //~ $common_patern = '/distrib/cauldron/i686'; // this huge regex magic achieved with a lot of help from great https://regex101.com/ $single_mirror_parsing_regex = '/\s*continent\s*=\s*(?\w*)\s*,\s*'; $single_mirror_parsing_regex .= '\s*zone\s*=\s*(?\w*)\s*,\s*'; @@ -239,10 +239,10 @@ class Downloads if ($documentation) { $test_file = $item['url'].'/doc/mga8/date.txt'; } else if ($mirrorlist) { - $test_file = $item['url'].'/distrib/9/x86_64/media/core/updates/repodata/repomd.xml'; // when changing, please change $common_patern too - $test_file = $item['url'].'/distrib/9/x86_64/media/core/release/meta-task-9-2.mga9.noarch.rpm'; // when changing, please change $common_patern too + $test_file = $item['url'].'/distrib/10/x86_64/media/core/updates/repodata/repomd.xml'; // when changing, please change $common_patern too + $test_file = $item['url'].'/distrib/10/x86_64/media/core/release/x11-apps-1.0.0-21.mga10.noarch.rpm'; // when changing, please change $common_patern too } else { - $test_file = $item['url'].'/iso/9/torrents/Mageia-9-Live-Xfce-i586.torrent'; + $test_file = $item['url'].'/iso/10/Mageia-10-alpha1-x86_64/DATE.txt'; } if (false === @file_get_contents($test_file)) { $num_dn++; @@ -287,7 +287,7 @@ class Downloads var_export($faults); echo ";\n"; } - echo "\nRemove char ' at each value on both arrays for cities and countries above : replace '_r(\" with just _r( and also behind \")', with \"),\n"; + echo "\nRemove char ' at each value on both arrays for cities and countries above : replace \"'_r(\" with just \"_r(\" and also behind \")\", with \"),\"\n"; echo "and update arrays in file /en/downloads/get/lib.php with that.\n"; } return $mirrors; -- cgit v1.2.1