diff options
-rw-r--r-- | import.ebuild_metadata.php | 12 |
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 |