From 229df61eba717104bbaa34b6112e0b4fd5503598 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 7 Mar 2019 13:58:16 +0100 Subject: table `upstream_packages` makes available_upstream_packages() obsolete --- buildmaster/deletion-links.php | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'buildmaster/deletion-links.php') diff --git a/buildmaster/deletion-links.php b/buildmaster/deletion-links.php index 54329bb..3a82c4e 100644 --- a/buildmaster/deletion-links.php +++ b/buildmaster/deletion-links.php @@ -16,29 +16,6 @@ if (array_key_exists("pkgname", $_GET)) else $filter = ""; -$available_upstream_packages = available_upstream_packages('pkgname'); - -mysql_run_query( - "CREATE TEMPORARY TABLE `available` (" . - "`pkgname` VARCHAR(88), " . - "UNIQUE KEY `name` (`pkgname`)" . - ")" -); - -mysql_run_query( - "INSERT INTO `available` (`pkgname`) VALUES (\"" . - implode(array_map("base64_encode", $available_upstream_packages), "\"),(\"") . - "\")" -); - -mysql_run_query( - "DELETE FROM `available` WHERE `available`.`pkgname`=\"\"" -); - -mysql_run_query( - "UPDATE `available` SET `available`.`pkgname`=from_base64(`available`.`pkgname`)" -); - mysql_run_query( "CREATE TEMPORARY TABLE `d_bpir` (" . "`id` BIGINT, " . @@ -53,7 +30,7 @@ mysql_run_query( " SELECT" . " `binary_packages_in_repositories`.`id`," . "IF(" . - "`available`.`pkgname` IS NULL," . + "`upstream_packages`.`id` IS NULL," . "\"#00ff00\"," . "IF(" . "`build_assignments`.`is_black_listed` IS NULL," . @@ -65,7 +42,8 @@ mysql_run_query( mysql_join_binary_packages_in_repositories_binary_packages() . mysql_join_binary_packages_build_assignments() . $available_filter . - " JOIN `available` ON `available`.`pkgname`=`binary_packages`.`pkgname`" . + " JOIN `upstream_packages`" . + " ON `upstream_packages`.`pkgname`=`binary_packages`.`pkgname`" . " WHERE `binary_packages_in_repositories`.`is_to_be_deleted`" . " AND `binary_packages`.`pkgname` NOT LIKE \"lib32-%\"" . $filter -- cgit v1.2.3-70-g09d2