summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dibb <beandog@gentoo.org>2010-01-04 21:06:13 +0000
committerSteve Dibb <beandog@gentoo.org>2010-01-04 21:06:13 +0000
commit369f580959cb1ed93921be21d2fb5ab611e48f9e (patch)
tree3c93c4b417b9944d30eb86623b74aafc1edd400d
parentless verbose (diff)
downloadznurt-org-backend-369f580959cb1ed93921be21d2fb5ab611e48f9e.tar.gz
znurt-org-backend-369f580959cb1ed93921be21d2fb5ab611e48f9e.tar.bz2
znurt-org-backend-369f580959cb1ed93921be21d2fb5ab611e48f9e.zip
package_recent changes
git-svn-id: file:///var/svn/portage@57 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
-rw-r--r--import.ebuilds.php6
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);