Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/web-scripts
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-06 10:50:32 +0100
committerErich Eckner <git@eckner.net>2018-02-06 10:50:32 +0100
commitae5771a8302c7f2d9353911363ffcb3fab14f9ee (patch)
tree78c4dc2827bc35c14819bc73c11cc80edb5e19a2 /web-scripts
parent057caf194aa7a9ecd49fba424d34065190304608 (diff)
web-scripts/to-delete.php: use `is_to_be_deleted` column from `binary_packages`
Diffstat (limited to 'web-scripts')
-rw-r--r--web-scripts/to-delete.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/web-scripts/to-delete.php b/web-scripts/to-delete.php
index 3d732a1..dfa5a39 100644
--- a/web-scripts/to-delete.php
+++ b/web-scripts/to-delete.php
@@ -12,20 +12,19 @@ if ($mysql->connect_error) {
}
$result = $mysql -> query(
- "SELECT DISTINCT " .
+ "SELECT " .
"`repositories`.`name` AS `repo`," .
- "`is_there`.`pkgname`," .
- "`is_there`.`epoch`," .
- "`is_there`.`pkgver`," .
- "`is_there`.`pkgrel`," .
- "`is_there`.`sub_pkgrel`," .
+ "`binary_packages`.`pkgname`," .
+ "`binary_packages`.`epoch`," .
+ "`binary_packages`.`pkgver`," .
+ "`binary_packages`.`pkgrel`," .
+ "`binary_packages`.`sub_pkgrel`," .
"`architectures`.`name` AS `arch` " .
- "FROM `binary_packages`AS `is_there` " .
- "JOIN `binary_packages` AS `to_delete` ON `to_delete`.`pkgname`=`is_there`.`pkgname` " .
- "JOIN `architectures` ON `is_there`.`architecture`=`architectures`.`id` " .
- "JOIN `repositories` ON `is_there`.`repository`=`repositories`.`id` " .
- "WHERE `to_delete`.`repository`=10 " .
- "AND NOT `is_there`.`repository` IN (4,9,10)"
+ "FROM `binary_packages` " .
+ "JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id` " .
+ "JOIN `repositories` ON `binary_packages`.`repository`=`repositories`.`id` " .
+ "WHERE `binary_packages`.`is_to_be_deleted` " .
+ "AND NOT `repositories`.`name` IN (\"build-support\",\"build-list\",\"deletion-list\")"
);
if ($result -> num_rows > 0) {