diff options
Diffstat (limited to 'import.ebuild_ev.php')
-rw-r--r-- | import.ebuild_ev.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/import.ebuild_ev.php b/import.ebuild_ev.php new file mode 100644 index 0000000..d2e67e9 --- /dev/null +++ b/import.ebuild_ev.php @@ -0,0 +1,51 @@ +<? + + $verbose = true; + $qa = true; + + + require_once 'header.php'; + require_once 'import.functions.php'; + + // Also fix the levels + $sql = "UPDATE ebuild e SET lvl = CASE + WHEN e.p IS NOT NULL THEN 6 + WHEN e.rc IS NOT NULL THEN 4 + WHEN e.pre IS NOT NULL THEN 3 + WHEN e.beta IS NOT NULL THEN 2 + WHEN e.alpha IS NOT NULL THEN 1 + ELSE 5 + END;"; + $db->query($sql); + + $sql = "SELECT * FROM missing_ev;"; + $arr = $db->getAll($sql); + + $arr_packages = array(); + + foreach($arr as $row) { + extract($row); + $arr_packages[$package][$ebuild] = $version; + + } + + foreach($arr_packages as $package => $arr) { + +// print_r($arr); + + $ext = extendVersions($arr); + +// print_r($ext); die; + + foreach($ext as $ebuild => $ev) { + $arr_update = array('ev' => $ev); + $db->autoExecute('ebuild', $arr_update, MDB2_AUTOQUERY_UPDATE, "id = $ebuild"); + } + + } + +// print_r($arr_packages); + + + +?>
\ No newline at end of file |