summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dibb <beandog@gentoo.org>2010-01-02 19:20:30 +0000
committerSteve Dibb <beandog@gentoo.org>2010-01-02 19:20:30 +0000
commit5d335e81d73cd363387b48510070b1115c1b7753 (patch)
tree450d9cda91bf4538de288cf20f5774482298cfd2
parentcosmetics (diff)
downloadznurt-org-backend-5d335e81d73cd363387b48510070b1115c1b7753.tar.gz
znurt-org-backend-5d335e81d73cd363387b48510070b1115c1b7753.tar.bz2
znurt-org-backend-5d335e81d73cd363387b48510070b1115c1b7753.zip
Replace a badly written view with a clean function and have it update descriptions only on packages that have changed along with their ebuilds
git-svn-id: file:///var/svn/portage@36 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
-rw-r--r--import.ebuild_metadata.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/import.ebuild_metadata.php b/import.ebuild_metadata.php
index f0f616a..2ccb6b7 100644
--- a/import.ebuild_metadata.php
+++ b/import.ebuild_metadata.php
@@ -50,7 +50,15 @@
}
// Set the new package descriptions
- $sql = "UPDATE package SET description = (SELECT description FROM view_package_description vpd WHERE vpd.package = package.id);";
- $db->query($sql);
+ $sql = "SELECT COUNT(1) FROM package WHERE status = 1;";
+ $count = $db->getOne($sql);
+ if($count) {
+ if($verbose)
+ shell::msg("Setting the new package descriptions for $count packages");
+
+ $sql = "UPDATE package SET description = package_description(id) WHERE id IN (SELECT p.id FROM package p INNER JOIN package_recent pr ON pr.package = p.id WHERE p.status = 1 AND p.portage_mtime = pr.max_ebuild_mtime);";
+ $db->query($sql);
+
+ }
?> \ No newline at end of file