diff options
Diffstat (limited to 'import.ebuilds.php')
-rw-r--r-- | import.ebuilds.php | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/import.ebuilds.php b/import.ebuilds.php index dfcd8ab..afb7ba0 100644 --- a/import.ebuilds.php +++ b/import.ebuilds.php @@ -19,9 +19,9 @@ * like that. It's too much of a pain to have it check for it (at this point). */ - $verbose = true; - $debug = false; - $all = false; +// $verbose = true; +// $debug = false; +// $all = false; if($debug) { $verbose = true; @@ -34,9 +34,6 @@ require_once 'class.portage.ebuild.php'; require_once 'class.db.ebuild.php'; - // Reset the status on ones that were going to be removed -// $sql = "UPDATE ebuild SET status = 0 WHERE status = 3;"; - $sql = "DELETE FROM ebuild WHERE status > 0;"; $db->query($sql); @@ -68,7 +65,6 @@ $arr_import = array(); // Find all the ebuilds that are currently in the db - // FIXME rewrite to exclude update/delete statuses? $arr = $arr_db = array(); if(!$all) { // Find all the packages that have been updated in the last 24 hours @@ -189,16 +185,11 @@ $arr_insert[] = $ebuild_name; // Normally I'd add this here, but instead, just go ahead and mark it // right away, and avoid having it run twice. - $db_ebuild->status = 3; -// $arr_delete[] = $ebuild_name; + $db_ebuild->status = 2; if($verbose) { shell::msg("[update] $category_name/$ebuild_name"); } - - // Flag as being updated (will be removed from end of import run) -// $db_ebuild->status = 2; - } } } @@ -206,25 +197,17 @@ // FIXME just pass the IDs if(count($arr_delete)) { - foreach($arr_delete as $ebuild_name) { - if($verbose) shell::msg("[delete] $category_name/$ebuild_name"); $ebuild = $arr_ebuild_ids[$category_name][$package_name][$ebuild_name]; if($ebuild) { -// $db_ebuild = new DBEbuild($ebuild); -// $db_ebuild->status = 3; - - $arr_update = array('status' => 3); + $arr_update = array('status' => 2); $db->autoExecute('ebuild', $arr_update, MDB2_AUTOQUERY_UPDATE, "id = ".$db->quote($id)); - } - } - } } |