diff options
author | Steve Dibb <beandog@gentoo.org> | 2010-01-02 20:11:06 +0000 |
---|---|---|
committer | Steve Dibb <beandog@gentoo.org> | 2010-01-02 20:11:06 +0000 |
commit | 363b6bb306597ca16886f3a335cbbc06d9daecd0 (patch) | |
tree | 5867f4d8663de608f04306956fb7139f9875b026 | |
parent | cleanup (diff) | |
download | znurt-org-backend-363b6bb306597ca16886f3a335cbbc06d9daecd0.tar.gz znurt-org-backend-363b6bb306597ca16886f3a335cbbc06d9daecd0.tar.bz2 znurt-org-backend-363b6bb306597ca16886f3a335cbbc06d9daecd0.zip |
cleanup status
git-svn-id: file:///var/svn/portage@51 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
-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)); - } - } - } } |