diff options
author | 2009-12-15 20:44:20 +0000 | |
---|---|---|
committer | 2009-12-15 20:44:20 +0000 | |
commit | 09088aa9aee870ff3e9dc490683976d224a68b4b (patch) | |
tree | 99637a9cd8193a2c937a3efd0e09d6726055916a /import.ebuild_ev.php | |
download | znurt-org-backend-09088aa9aee870ff3e9dc490683976d224a68b4b.tar.gz znurt-org-backend-09088aa9aee870ff3e9dc490683976d224a68b4b.tar.bz2 znurt-org-backend-09088aa9aee870ff3e9dc490683976d224a68b4b.zip |
initial commit
git-svn-id: file:///var/svn/portage@1 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
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 |