diff options
author | Steve Dibb <beandog@gentoo.org> | 2010-01-04 21:06:13 +0000 |
---|---|---|
committer | Steve Dibb <beandog@gentoo.org> | 2010-01-04 21:06:13 +0000 |
commit | 369f580959cb1ed93921be21d2fb5ab611e48f9e (patch) | |
tree | 3c93c4b417b9944d30eb86623b74aafc1edd400d | |
parent | less verbose (diff) | |
download | znurt-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.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); |