summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dibb <beandog@gentoo.org>2010-01-05 06:06:49 +0000
committerSteve Dibb <beandog@gentoo.org>2010-01-05 06:06:49 +0000
commit94035ee59f70fa3f97dd7635546a25a9f159fff8 (patch)
tree9ee16f15b2c47dc67a75194fcf3c5f4e224381a9 /import.all.php
parentMuch more flexibliity on importing package masks, should be self-healing now (diff)
downloadznurt-org-backend-94035ee59f70fa3f97dd7635546a25a9f159fff8.tar.gz
znurt-org-backend-94035ee59f70fa3f97dd7635546a25a9f159fff8.tar.bz2
znurt-org-backend-94035ee59f70fa3f97dd7635546a25a9f159fff8.zip
add comments; cleanup; cosmetics
git-svn-id: file:///var/svn/portage@65 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
Diffstat (limited to 'import.all.php')
-rw-r--r--import.all.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/import.all.php b/import.all.php
index aaa4b27..03bb13d 100644
--- a/import.all.php
+++ b/import.all.php
@@ -2,20 +2,31 @@
require_once 'header.php';
+ // This gets used everywhere, might as well create it here
+ // and check for it later.
+ require_once 'class.portage.tree.php';
+ $tree = new PortageTree();
+
+ // Had it choke out on me when starting from scratch
ini_set('memory_limit', -1);
+ // Always verbose since we are generally running manually from CLI
$verbose = true;
+ // Run with -cron arg to go quietly into the night.
+ // No code in here to do emerge --sync. Runs separately.
if(in_array("-cron", $argv)) {
$verbose = false;
$cron = true;
}
+ // Log the import times of the scripts
if($cron) {
$sql = "INSERT INTO znurt (action) VALUES ('start_import');";
$db->query($sql);
}
+ // FIXME these could be accidentally overwritten in one of the includes
$base = true;
$packages = true;
$ebuilds = true;
@@ -23,14 +34,15 @@
$use = true;
$final = true;
+ // Thankfully, I've never really had these break down much, never
+ // had much use for the grouping.
$arr_import['base'] = array('arches', 'eclasses', 'herds', 'licenses');
$arr_import['packages'] = array('categories', 'packages', 'bugzilla');
$arr_import['ebuilds'] = array('ebuilds');
$arr_import['metadata'] = array('ebuild_metadata', 'ebuild_arch', 'ebuild_homepage', 'ebuild_license', 'package_mask', 'ebuild_mask', 'ebuild_ev', 'use_global', 'use_local', 'use_expand', 'ebuild_use', 'ebuild_depend');
-
$arr_import['final'] = array('final');
-
+ // FIXME updating the website with our import status would be nice.
foreach($arr_import as $key => $arr) {
if($$key) {
foreach($arr as $file) {