diff options
-rw-r--r-- | import.ebuilds.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/import.ebuilds.php b/import.ebuilds.php index 84a39fe..450ff27 100644 --- a/import.ebuilds.php +++ b/import.ebuilds.php @@ -276,7 +276,11 @@ $sql = "DELETE FROM package_recent WHERE status = 1;"; $db->query($sql); - $sql = "INSERT INTO package_recent SELECT DISTINCT package, MAX(cache_mtime), 1 FROM ebuild e GROUP BY package ORDER BY MAX(cache_mtime) DESC, package;"; + $sql = "INSERT INTO package_recent SELECT DISTINCT package, MAX(cache_mtime), 1 AS status FROM ebuild e GROUP BY package ORDER BY MAX(cache_mtime) DESC, package;"; + $db->query($sql); + + // Same for the arches + $sql = "INSERT INTO package_recent_arch SELECT DISTINCT package, MAX(cache_mtime), 1 AS status, ea.arch FROM ebuild e LEFT OUTER JOIN ebuild_arch ea ON ea.ebuild = e.id WHERE ea.arch IS NOT NULL AND ea.status != 2 GROUP BY package, ea.arch ORDER BY MAX(cache_mtime) DESC, package;"; $db->query($sql); |