summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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) {