Missing package name
query($sql);
$rpm = ($resrpm ? $resrpm->fetchObject() : false);
$sql = "SELECT * FROM upstream WHERE name = '$name'";
$resup=$db->query($sql);
$up = ($resup ? $resup->fetchObject() : false);
$sql = "SELECT * FROM acls WHERE name = '$name'";
$resown=$db->query($sql);
$owner = ($resown ? $resown->fetchObject() : false);
if (!$rpm) {
echo "
$name not found
\n";
} else {
echo "
Package: $name
\n";
if (isset($_GET['pkgdb'])) {
$fedpkg = $fedcli->getPackageInfo($name);
echo "
Hide pkgdb informations
";
} else {
$fedpkg = false;
echo "
Show more informations from pkgdb
";
}
echo "
\n";
echo "Upstream info\n";
$i=0;
if ($rpm->summary) {
echo ""; $i++;
echo "Summary: | ". $rpm->summary . " |
\n";
} else if ($owner->summary) {
echo ""; $i++;
echo "Summary: | ". $owner->summary . " |
\n";
}
echo ""; $i++;
echo "Description: | " . ((isset($fedpkg['devel']['package']['description'])) ? $fedpkg['devel']['package']['description'] : $ajax_infos) . " |
\n";
if ($rpm->url) {
echo ""; $i++;
echo "URL: | ". $rpm->url . " |
\n";
}
if ($up && $up->type) {
echo ""; $i++;
echo "Type: | ". $up->type . " |
\n";
}
if ($up && $up->channel) {
echo ""; $i++;
echo "Channel: | ". $up->channel . " |
\n";
}
if ($up && $up->stable) {
echo ""; $i++;
echo "Stable version: | ". $up->stable . " |
\n";
}
if ($up && $up->unstable && $up->stable!=$up->unstable) {
echo ""; $i++;
echo "Unstable version: | ". $up->unstable . "";
if ($up->state) {
echo " (". $up->state . ")\n";
}
echo " |
\n";
}
if ($owner && $owner->owner) {
echo ""; $i++;
echo "Owner: | ". $owner->owner . "";
if ($owner->cc) {
echo " (". $owner->cc . ")\n";
}
echo " |
\n";
}
echo "ViewVC: | "; $i++;
echo "http://cvs.fedoraproject.org/viewvc/rpms/$name/";
echo " |
\n";
echo "
";
echo "
\n";
echo "Packages available in Fedora Repositories\n";
echo "Branch | Repository | Version-Release | Owner | Co-maintainers |
\n";
$prev=false;
do {
if ($rpm->repo_main=='rawhide' && isset($fedpkg['devel']['owner'])) {
$owner = $fedpkg['devel']['owner'];
$people = $fedpkg['devel']['people'];
} else if (isset($fedpkg[$rpm->repo_main]['owner'])) {
$owner = $fedpkg[$rpm->repo_main]['owner'];
$people = $fedpkg[$rpm->repo_main]['people'];
} else {
$owner =" ";
$people = false;
}
$comaint = '';
if ($people) foreach ($people as $user) {
if (isset($user['aclOrder']['commit']['statuscode']) && $user['aclOrder']['commit']['statuscode']==3) {
if ( $comaint !== '' ) {
$comaint .= ', ';
}
$comaint .= $user['username'];
}
}
echo ""; $i++;
echo "".($rpm->repo_main==$prev ? " " : $rpm->repo_main)." | ";
echo "".$rpm->repo_sub." | ";
echo "".($rpm->epoch ? $rpm->epoch.":" : "").$rpm->ver."-".$rpm->rel." | ";
$id = 'pkgdb_' . $rpm->repo_main;
if ( $rpm->repo_main != $prev ) {
echo "" . (($fedpkg) ? $owner : $ajax_infos) . " | " . (($fedpkg) ? $comaint : $ajax_infos) . " |
\n";
} else {
echo ' | | ';
}
if( $rpm->repo_main != $prev ) {
$prev = $rpm->repo_main;
}
} while ($rpm = $resrpm->fetchObject());
echo "
";
}
}
catch(PDOException $e) {
printf("%s ERREUR : %s\n", date("r"), $e->getMessage());
}
}
?>