getAssoc($sql); if($verbose) shell::msg(number_format(count($arr))." ebuilds to check"); foreach($arr as $ebuild_id => $row) { extract($row); $obj_ebuild = new PortageEbuild("$category/$pf"); if($debug) shell::msg("[$category/".$obj_ebuild->pn."]"); $arr_metadata = $obj_ebuild->metadata(); if(count($arr_metadata)) { foreach($arr_metadata as $keyword => $value) { if(!empty($value)) { $arr_insert = array( 'ebuild' => $ebuild_id, 'keyword' => $keyword, 'value' => $value, ); $db->autoExecute('ebuild_metadata', $arr_insert, MDB2_AUTOQUERY_INSERT); } } } else { if($verbose || $qa) shell::msg("[QA] No metadata: $category/".$obj_ebuild->pf); } } // Set the new package descriptions $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); } ?>