From 3c733778909fd15af6308fda7f82fa995c6660b4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 31 Jan 2018 11:16:52 +0100 Subject: web-scripts/broken-packages.php: add links to git repositories on respective file and commit (if relevant) --- web-scripts/broken-packages.php | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'web-scripts/broken-packages.php') diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php index 4a42d92..3468681 100644 --- a/web-scripts/broken-packages.php +++ b/web-scripts/broken-packages.php @@ -19,7 +19,11 @@ $result = $mysql -> query( "`package_sources`.`pkgbase`," . "`package_sources`.`git_revision`," . "`package_sources`.`mod_git_revision`," . - "`upstream_repositories`.`name`," . + "`package_sources`.`uses_upstream`," . + "`package_sources`.`uses_modification`," . + "`upstream_repositories`.`name` AS `package_repository`," . + "`git_repositories`.`name` AS `git_repository`," . + "`architectures`.`name` AS `arch`," . "EXISTS (SELECT * " . "FROM `binary_packages` `broken_bin` " . "JOIN `dependencies` ON `dependencies`.`dependent` = `broken_bin`.`id` " . @@ -35,8 +39,10 @@ $result = $mysql -> query( "WHERE `build_dependency_loops`.`build_assignment`=`build_assignments`.`id`" . ") AS `loops` " . "FROM `build_assignments` " . + "JOIN `architectures` ON `build_assignments`.`architecture` = `architectures`.`id` " . "JOIN `package_sources` ON `build_assignments`.`package_source` = `package_sources`.`id` " . "JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository` = `upstream_repositories`.`id` " . + "JOIN `git_repositories` ON `upstream_repositories`.`git_repository`=`git_repositories`.`id` " . "JOIN `binary_packages` ON `binary_packages`.`build_assignment` = `build_assignments`.`id` " . "JOIN `repositories` ON `binary_packages`.`repository` = `repositories`.`id` " . "WHERE (`build_assignments`.`is_broken` OR `build_assignments`.`is_blocked` IS NOT NULL) AND `repositories`.`name`=\"build-list\"" @@ -90,9 +96,33 @@ if ($result -> num_rows > 0) { $rows[$count]["pkgbase_print"] = $rows[$count]["pkgbase"]; else $rows[$count]["pkgbase_print"] = "(" . $rows[$count]["pkgbase"] . ")"; - $rows[$count]["git_revision"] = $row["git_revision"]; - $rows[$count]["mod_git_revision"] = $row["mod_git_revision"]; - $rows[$count]["name"] = $row["name"]; + if ($row["uses_upstream"]) { + $rows[$count]["git_revision"] = + "" . + $row["git_revision"] . ""; + } else + $rows[$count]["git_revision"] = $row["git_revision"]; + if ($row["uses_modification"]) + $rows[$count]["mod_git_revision"] = + "" . + $row["mod_git_revision"] . ""; + else + $rows[$count]["mod_git_revision"] = $row["mod_git_revision"]; + $rows[$count]["package_repository"] = $row["package_repository"]; if ($row["is_blocked"]=="") { $rows[$count]["is_blocked"]=" "; } @@ -143,7 +173,7 @@ if ($result -> num_rows > 0) { print "".$row["pkgbase_print"].""; print "

".$row["git_revision"]."

"; print "

".$row["mod_git_revision"]."

"; - print "".$row["name"].""; + print "".$row["package_repository"].""; print "".$row["trials"].""; print "".$row["loops"].""; // 0 -- cgit v1.2.3-70-g09d2