summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update_gentoo_profiles.php')
-rwxr-xr-xupdate_gentoo_profiles.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/update_gentoo_profiles.php b/update_gentoo_profiles.php
index e15e895..8da7443 100755
--- a/update_gentoo_profiles.php
+++ b/update_gentoo_profiles.php
@@ -15,14 +15,11 @@ while ($p=$r->fetch(PDO::FETCH_ASSOC)) {
$profile->read_pkgsets(true);
echo "done\n";
}
-foreach (explode("\n", trim(file_get_contents(CACHE.'/stage3/map'))) as $line) {
- list($p, $file)=explode(' ', $line, 2);
- if (!is_numeric($p)) continue;
- $profile=&$profiles[$p];
- if ($profile->stage3 == $file) continue;
- $profile->stage3=$file;
- $profile->write();
- echo "Loading info from profile $profile->pkgdir stage3 at $file...";
- echo ($profile->read_stage3(true)?'done':color('failed', 'red'))."\n";
+$r=query('SELECT * FROM `cache` WHERE `type`="stage3"');
+while ($row=$r->fetch(PDO::FETCH_ASSOC)) {
+ $entry=new sql_cache_entry($row);
+ echo "Reading contents of stage3 file $entry->file...";
+ read_stage3($entry, true);
+ echo "done\n";
}
?>