Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/why-dont-you17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 614cd15..a3c2aa2 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -24,9 +24,8 @@ case "${action}" in
# shellcheck disable=SC2016
{
- printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64));\n'
- printf 'INSERT INTO `pkgbases` VALUES '
- # TODO: allow to filter by architecture
+ printf 'CREATE TEMPORARY TABLE `searches` (`search` VARCHAR(64));\n'
+ printf 'INSERT INTO `searches` VALUES '
# shellcheck disable=SC2046
printf '(from_base64("%s")),' \
$(
@@ -54,9 +53,9 @@ case "${action}" in
'to_build' 'is_blocked' \
'deps' 'pkgbase' \
'build_slaves' 'name' \
- 'pkgbases' 'pkgbase'
- # at least one row for each given `pkgbase`
- printf ' FROM `pkgbases`'
+ 'to_build' 'pkgbase'
+ # at least one row for each given `search`
+ printf ' FROM `searches`'
printf ' LEFT JOIN '
printf '('
# join the tables for the to-be-built packages:
@@ -76,8 +75,10 @@ case "${action}" in
printf ' WHERE `tb_bir`.`repository`=%s' \
"${repository_ids__any_build_list}"
printf ') AS `to_build`'
- printf ' ON `to_build`.`pkgbase`=`pkgbases`.`pkgbase`'
- printf ' LEFT JOIN '
+ printf ' ON ('
+ printf '`to_build`.`pkgbase`=`searches`.`search`'
+ printf ' OR `searches`.`search`=CONCAT(`to_build`.`baa_name`,"/",`to_build`.`pkgbase`)'
+ printf ') LEFT JOIN '
printf '('
# same join as above, but with different names - for the
# potential dependencies