".
- "";
+ "";
}
function end_pre()
@@ -290,10 +293,15 @@ function dump_log($tail)
$df = preg_replace("/.*\/([^\/]*)$/", "\\1", $f);
$df = preg_replace("/\.(bz2|gz)$/", "", $df);
+ list($name, $id) = explode(',', $df);
- echo "$df";
+ if ($name != 'command') {
+ $gitweb_url = "http://git.pld-linux.org/?p=packages/$name.git;a=summary";
+ $name = "$name";
+ }
+ echo "$name $id";
- echo " ";
+ echo "";
function one_item($h, $t) {
echo "$h: | ".
@@ -336,7 +344,6 @@ function dump_log($tail)
getenv("SCRIPT_NAME") . "?idx=$idx&ok=$ok&id=$id" .
" "; */
- echo " ";
# what can I say beside PHP suxx? how the fuck should I create
@@ -351,47 +358,106 @@ function dump_log($tail)
}
$cmd = "$filter '$root_directory/$f'";
- if ($tail)
- $cmd = "$cmd | tail -n 100";
$fd = popen($cmd, "r");
$toc = array();
- ob_start();
- $err_count = 0;
+ $err = array();
+ $first_cut = false;
+ $first_cut_done = false;
+ $time = "";
+ $out_buf = array();
+ $out_buf_size = 0;
while (($s = fgets($fd, 102400)) != false) {
- if (strlen($s) > 800) {
- $s = chunk_split($s, 800, "\n ");
- $s = trim($s);
- }
+
+ $toc_elem = false;
+ $err_elem = false;
+
$s = htmlspecialchars($s);
// highlight errors
- if (preg_match("/errors?:/i", $s)) {
+ if (preg_match("/(?:fail|error(s|\sCS\d+)?):/i", $s)) {
+ $first_cut = true;
+ $err_count++;
+ $toc_elem = "error $err_count";
+ $err_elem = $s;
+ $s = "$s";
+ } elseif (preg_match("/(?:undefined reference to|recipe for target '.*?' failed)/i", $s)) {
+ $first_cut = true;
$err_count++;
+ $toc_elem = "error $err_count";
+ $err_elem = $s;
$s = "$s";
- $toc[] = "error $err_count";
+ } elseif (preg_match("#^\+ /usr/bin/make\b.*\b(?Pcheck)\b#", $s, $m)) {
+ // rpm build section
+ $toc_elem = "make {$m['target']}";
+ $err_elem = $s;
+ $s = "$s";
+ } elseif (preg_match('/^(?P- For complete changelog see:) (?P.+)$/', $s, $m)) {
+ // rpm changelog link
+ $link = "{$m['link']}";
+ $s = "{$m['line']} $link ";
+ } elseif (preg_match('/^(?P\* \w{3} \w{3} [ \d]{2} \d{4} .*?) (?P[a-z0-9]{7})$/', $s, $m)) {
+ // rpm changelogs
+ $url = "http://git.pld-linux.org/?p=packages/{$name_url}.git;a=commitdiff;h={$m['hash']}";
+ $link = "{$m['hash']}";
+ $s = "{$m['line']} $link ";
} elseif (substr($s, 0, 2) == "+ ") {
// shell verbose
$s = "$s";
} elseif (preg_match("/^Executing\(%(?P\w+)\)/", $s, $m)) {
// rpm build section
+ $toc_elem = $m['section'];
+ $err_elem = $s;
$s = "$s";
- $toc[] = $m['section'];
} elseif (preg_match("/^Processing files: (?P(?P.+)-[^-]+-[^-]+)/", $s, $m)) {
+ $first_cut = true;
// processing files
+ $toc_elem = "files ".$m['name'];
+ $err_elem = $s;
$s = "$s";
- $toc[] = "files ".$m['name'];
+ } elseif (preg_match("/^ended at: (?P.+), done in (?P ";
if (!empty($toc)) {
echo ""._("Toc:")."";
echo "";
- foreach ($toc as $section) {
+ foreach ($toc as $i => $section) {
$id = str_replace(" ", "-", $section);
echo "- {$section}
";
+ echo "{$err[$i]} ";
}
echo " ";
}
@@ -434,7 +500,10 @@ function dump_text()
date("Y/m/d H:i:s", filemtime("$root_directory/$f")) . "\n";
if (preg_match("/\.bz2$/", $f)) {
- $filter = "bzcat";
+ if (is_executable("/usr/bin/lbzcat"))
+ $filter = "lbzcat";
+ else
+ $filter = "bzcat";
} elseif (preg_match("/\.gz$/", $f)) {
$filter = "zcat";
} else {
@@ -460,16 +529,17 @@ function list_archs()
echo "\n";
echo ""._("Failed")." | "._("Ok")." | \n";
- foreach ($addr as $dist => $ddist) {
- foreach ($ddist as $arch) {
- echo "".
- "
- $dist/$arch | ".
- "[OK] | ".
- #"[qa] | ".
- " \n";
- }
- }
+ foreach ($addr as $dist => $ddist) {
+ echo "
| \n";
+ foreach ($ddist as $arch) {
+ echo "".
+ "
+ $dist/$arch | ".
+ "[OK] | ".
+ #"[qa] | ".
+ " \n";
+ }
+ }
echo " \n";
echo "";
@@ -477,10 +547,10 @@ function list_archs()
echo " main()
\n";
echo " \n" .
- " (c) 2002 ".
+ "alt=\""._("Powered by PLD Linux")."\" border=\"0\" /> \n" .
+ "(c) 2002-". date("Y") . " ".
"PLD Team \n".
- '$Revision: 1.18 $'.
+ '$Revision: 1.37 $'.
" \n";
# smile ;)
@@ -535,11 +605,7 @@ function get_qa()
if (!isset($dist) || !isset($arch))
return false;
- if($dist!='ti'){
- $addr = "http://ftp.pld-linux.org/dists/$dist/.stat/builder/$dist/rpmqa-$arch.txt";
- }else{
- $addr = "http://ftp.pld-linux.org/branches/titanium/.stat/builder/$dist/rpmqa-$arch.txt";
- }
+ $addr = "http://ftp1.pld-linux.org/dists/$dist/.stat/builder/$dist/rpmqa-$arch.txt";
return fopen("$addr", "r");
}
@@ -556,10 +622,15 @@ function search_qa()
echo _("Sorry, cannot open.");
} else {
while (($s = fgets($f, 1000)) != false) {
+ if (stristr($s, "Query done at:")) {
+ echo "rpmqa database from " . strstr($s, ":") . "\n";
+ continue;
+ }
+
if (stristr($s, $str))
echo $s;
}
- echo "/* EOF */";
+ echo "\n/* EOF */";
}
end_pre();
}
@@ -852,8 +923,7 @@ function welcome()
=_("Feel free to email bug reports, complaints and feature requests ")?>
=_("to us")?>. =_("Positive opinions are also")?>
-=_("welcome")?> ;)
-Version: $Id: index.php,v 1.18 2012/03/21 11:40:49 glen Exp $
+ =_("welcome")?> ;)
| |