Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-26 14:11:27 +0100
committerErich Eckner <git@eckner.net>2020-02-26 14:11:27 +0100
commitbfa69561d1b5c91d2eeea2822c7762da4c68c6eb (patch)
treed933a2f037c6ba30a7f18080af632ce52d3d7bf8
parentaa640a0289438069270d12bc532636ba2ed4940e (diff)
bin/why-dont-you: ignore packages that are requested to being moved
-rwxr-xr-xbin/why-dont-you18
1 files changed, 14 insertions, 4 deletions
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 9b50427..61eae34 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -263,12 +263,19 @@ case "${action}" in
# shellcheck disable=SC2016
{
- printf 'CREATE TEMPORARY TABLE `bpirs` ('
- printf '`id` BIGINT,'
- printf 'UNIQUE KEY `id`(`id`)'
- printf ');\n'
+ for copy in '' '_2'; do
+ printf 'CREATE TEMPORARY TABLE `bpirs%s` (' \
+ "${copy}"
+ printf '`id` BIGINT,'
+ printf 'UNIQUE KEY `id`(`id`)'
+ printf ');\n'
+ done
printf 'LOAD DATA LOCAL INFILE "%s" INTO TABLE `bpirs`;\n' \
"${tmp_dir}/packages"
+ printf 'INSERT INTO `bpirs_2`(`id`)'
+ printf ' SELECT '
+ printf '`bpirs`.`id`'
+ printf ' FROM `bpirs`;\n'
printf 'SELECT CONCAT('
printf '"\\"",'
@@ -302,6 +309,9 @@ case "${action}" in
mysql_join_binary_packages_in_repositories_repositories 'itp_bpir' 'itp_r'
printf ' AND `itp_r`.`architecture`=`repositories`.`architecture`'
printf ' AND `repositories`.`stability`=`itp_r`.`stability`'
+ printf ' LEFT JOIN `bpirs_2`'
+ printf ' ON `bpirs_2`.`id`=`itp_bpir`.`id`'
+ printf ' WHERE `bpirs_2`.`id` IS NULL'
printf ') AS `sub_q`'
printf ' GROUP BY `sub_q`.`id`;\n'