summaryrefslogtreecommitdiff
path: root/bin/why-dont-you
diff options
context:
space:
mode:
Diffstat (limited to 'bin/why-dont-you')
-rwxr-xr-xbin/why-dont-you11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 2ea27ab..78587a5 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -253,7 +253,7 @@ case "${action}" in
printf ' `content_type` ENUM("bpir","it"),'
printf ' `reason_length` MEDIUMINT,'
printf ' `active` BIT,'
- printf ' `relevant` BIT,'
+ printf ' `relevance_level` MEDIUMINT,'
printf ' UNIQUE KEY (`id`),'
printf ' UNIQUE KEY `content`(`content_id`,`content_type`));\n'
printf 'CREATE TEMPORARY TABLE `edges%s` (' \
@@ -403,8 +403,13 @@ case "${action}" in
printf ' AND `i`.`content_type`="bpir";\n'
while read -r bpir pkgname; do
- printf 'CALL `find_the_culprit`(%s);\n' \
- "${bpir}"
+ printf 'CALL `find_the_culprit`('
+ printf '(SELECT `knots`.`id`'
+ printf ' FROM `knots`'
+ printf ' WHERE `knots`.`content_type`="bpir"'
+ printf ' AND `knots`.`content_id`=%s)' \
+ "${bpir}"
+ printf ');\n'
done < \
"${tmp_dir}/packages"
} | \