summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-master-status2
-rwxr-xr-xbin/build-master-status-from-mysql16
-rwxr-xr-xbin/check-bugtracker2
-rwxr-xr-xbin/copy-to-build-support2
-rwxr-xr-xbin/db-update4
-rwxr-xr-xbin/get-assignment8
-rwxr-xr-xbin/get-package-updates4
-rwxr-xr-xbin/modify-package-state2
-rwxr-xr-xbin/return-assignment8
-rwxr-xr-xbin/seed-build-list6
-rwxr-xr-xbin/show-dependencies4
-rwxr-xr-xbin/why-dont-you2
12 files changed, 30 insertions, 30 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index deb58da..006750b 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -562,7 +562,7 @@ if ${web}; then
# shellcheck disable=SC2016
{
printf 'SHOW CREATE TABLE `todos`' | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed '
1s/^\S\+\s\+CREATE TABLE `todos` /CREATE TEMPORARY TABLE `td` /
'
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql
index 7cf1b95..a72d396 100755
--- a/bin/build-master-status-from-mysql
+++ b/bin/build-master-status-from-mysql
@@ -27,7 +27,7 @@ fi
mysql_join_binary_packages_repositories
printf ' WHERE `repositories`.`name`="build-list"'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' ' | \
sort > \
"${tmp_dir}/build-list.mysql"
@@ -45,7 +45,7 @@ sort "${work_dir}/build-list" > \
mysql_join_build_assignments_package_sources
mysql_join_package_sources_upstream_repositories
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' ' | \
sort > \
"${tmp_dir}/locked.mysql"
@@ -66,7 +66,7 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 -name '*.locked' -prin
printf ' WHERE `repositories`.`name`="deletion-list"'
printf ' OR `binary_packages`.`is_to_be_deleted`;\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sort > \
"${tmp_dir}/deletion-list.mysql"
sort "${work_dir}/deletion-list" > \
@@ -80,7 +80,7 @@ sort "${work_dir}/deletion-list" > \
mysql_join_build_assignments_build_dependency_loops
printf ';\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sort > \
"${tmp_dir}/loops.mysql"
find "${work_dir}/build-list.loops" -regextype grep -mindepth 1 -maxdepth 1 \
@@ -107,7 +107,7 @@ find "${work_dir}/build-list.loops" -regextype grep -mindepth 1 -maxdepth 1 \
printf ' AND NOT `binary_packages`.`has_issues`'
printf ' AND `repository_stabilities`.`name`="testing"'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed '
s/^\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)$/\1-\2:\3-\4.\5-\6.pkg.tar.xz/
' | \
@@ -141,7 +141,7 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
printf ' AND NOT `binary_packages`.`has_issues`'
printf ' AND `repository_stabilities`.`name`="testing"'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed '
s/^\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)$/\1-\2:\3-\4.\5-\6.pkg.tar.xz/
' | \
@@ -174,7 +174,7 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
mysql_join_package_sources_upstream_repositories
printf ' WHERE `dependency_types`.`relevant_for_building`'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' ' | \
sort -u > \
"${tmp_dir}/build-dependencies.mysql"
@@ -191,7 +191,7 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
mysql_join_package_sources_build_assignments
mysql_join_build_assignments_binary_packages
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' ' | \
while read -r pkgbase git_revision mod_git_revision repository; do
if [ -f "${work_dir}/package-infos/${pkgbase}.${git_revision}.${mod_git_revision}.${repository}.build-depends" ]; then
diff --git a/bin/check-bugtracker b/bin/check-bugtracker
index 156f438..5bd05b4 100755
--- a/bin/check-bugtracker
+++ b/bin/check-bugtracker
@@ -26,7 +26,7 @@ bug_list=$(
printf ' FROM `repository_stabilities`'
printf ' WHERE NOT `repository_stabilities`.`bugtracker_category` IS NULL'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
while read -r stability_id category; do
for has_issues in '1:' '0:NOT '; do
printf 'UPDATE `binary_packages`'
diff --git a/bin/copy-to-build-support b/bin/copy-to-build-support
index e447596..b3decd4 100755
--- a/bin/copy-to-build-support
+++ b/bin/copy-to-build-support
@@ -44,7 +44,7 @@ sed -n '
"$(printf '%s' "${architecture}" | base64 -w0)"
printf ' LIMIT 1;\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' '
)
if [ -z "${id}" ]; then
diff --git a/bin/db-update b/bin/db-update
index 5efa220..5756494 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -467,7 +467,7 @@ errors=$(
printf ' JOIN `repository_stabilities` ON `repository_stability_relations`.`more_stable`=`repository_stabilities`.`id`'
printf ' WHERE `repository_stabilities`.`name` = "testing"'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed 'p'
# shellcheck disable=SC2086
printf '%s\n' ${packages_to_force_stabilize} | \
@@ -503,7 +503,7 @@ errors=$(
printf ' JOIN `repository_stabilities` ON `repository_stability_relations`.`more_stable`=`repository_stabilities`.`id`'
printf ' WHERE `repository_stabilities`.`name` = "staging"'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed 'p'
# shellcheck disable=SC2086
printf '%s\n' ${packages_to_force_unstage} | \
diff --git a/bin/get-assignment b/bin/get-assignment
index 964c6b7..2df3059 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -58,7 +58,7 @@ hand_out_assignment() {
"$(printf '%s' "$4" | base64 -w0)"
printf ' LIMIT 1;\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' '
{
@@ -154,7 +154,7 @@ currently_building=$(
printf ' AND `repositories`.`name`="build-list"'
printf ' LIMIT 1;\n'
} | \
- mysql_run_query -N --batch --raw
+ mysql_run_query
)
if [ -n "${currently_building}" ]; then
@@ -210,7 +210,7 @@ next_building=$(
printf ' ORDER BY `requested` DESC, `priority` DESC, `last_trial`, `part_of_loop`, `build_assignments`.`id`'
printf ' LIMIT 1;\n'
} | \
- mysql_run_query -N --batch --raw | \
+ mysql_run_query | \
sed '
y/\t/ /
s/^.* \(\S\+\( \S\+\)\{3\}\)$/\1/
@@ -233,7 +233,7 @@ count_pending=$(
printf ' AND `build_assignments`.`is_blocked` IS NULL'
printf ';\n'
} | \
- mysql_run_query -N --batch --raw
+ mysql_run_query
)
if [ "${count_pending}" -eq 0 ]; then
diff --git a/bin/get-package-updates b/bin/get-package-updates
index e855b19..a95bd94 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -391,7 +391,7 @@ black_listed_new=$(
printf ' FROM `package_sources`'
printf ' WHERE `package_sources`.`pkgbase` LIKE "lib32-%%"'
} | \
- mysql_run_query -N --raw --batch
+ mysql_run_query
} | \
sort -u
)
@@ -442,7 +442,7 @@ while [ -n "${black_listed_new}" ]; do
printf ' WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`'
printf ');\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sort -u
} | \
grep -vxF '' | \
diff --git a/bin/modify-package-state b/bin/modify-package-state
index 68b2384..9b0571b 100755
--- a/bin/modify-package-state
+++ b/bin/modify-package-state
@@ -225,7 +225,7 @@ while read -r package reason; do
;;
esac
if printf 'SELECT 1 FROM %s %s AND %s LIMIT 1' "${combiner}" "${selector}" "${tester}" | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
grep -qxF '1'; then
# shellcheck disable=SC2016
{
diff --git a/bin/return-assignment b/bin/return-assignment
index a7e6623..717a30e 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -70,7 +70,7 @@ if [ "$5" = 'ERROR' ]; then
"$(printf '%s' "$4" | base64 -w0)"
printf ' AND `repositories`.`name`="build-list"'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' '
)
if [ -z "${infos}" ]; then
@@ -108,7 +108,7 @@ if [ "$5" = 'ERROR' ]; then
printf 'SELECT `fail_reasons`.`id`,replace(to_base64(`fail_reasons`.`identifier`),"\\n","")'
printf ' FROM `fail_reasons` ORDER BY `fail_reasons`.`severity`'
} | \
- mysql_run_query -N --raw --batch
+ mysql_run_query
)
for saved_build_log in ${saved_build_logs}; do
printf '%s' "${fail_reason_identifiers}" | \
@@ -279,7 +279,7 @@ if ! {
printf ' AND `binary_packages`.`sub_pkgrel`=from_base64("%s");\n' \
"$(printf '%s' "$5" | base64 -w0)"
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
grep -qvxF '0'; then
>&2 echo 'Sorry, the sent package is outdated.'
exit 2
@@ -436,7 +436,7 @@ package_errors=$(
printf ' AND `repositories`.`name`="build-list"'
printf ';\n'
} | \
- mysql_run_query -N --raw --batch
+ mysql_run_query
} | \
sort -k2 | \
uniq -u -f1
diff --git a/bin/seed-build-list b/bin/seed-build-list
index def9d56..d49a8f3 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -125,7 +125,7 @@ if [ -s "${tmp_dir}/mirrors" ]; then
printf ' FROM `binary_packages`'
mysql_join_binary_packages_architectures
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed '
s/^\(.*\)-\([^-]\+-[^-]\+\)-\([^-]\+\)/ours \2 \3 \1/
'
@@ -205,7 +205,7 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V
printf ' WHERE `ignore_packages`.`pkgname`=`must_haves`.`pkgname`'
printf ') AND NOT `must_haves`.`pkgname` LIKE "lib32-%%";\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
while read -r pkgname; do
content=$(
curl -Ss 'https://www.archlinux.org/packages/search/json/?name='"${pkgname}" | \
@@ -292,7 +292,7 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V
printf ' WHERE `ignore_packages`.`pkgname`=`binary_packages`.`pkgname`'
printf ');\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sort -u | \
tr '\t' ' ' | \
if ${update}; then
diff --git a/bin/show-dependencies b/bin/show-dependencies
index ed7ca87..492f11b 100755
--- a/bin/show-dependencies
+++ b/bin/show-dependencies
@@ -10,7 +10,7 @@
if [ $# -eq 0 ]; then
broken=$(
printf 'CALL show_broken_packages_and_dependencies;\n' | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed '
s/\s.*$//
' | \
@@ -177,7 +177,7 @@ for target_package in "$@"; do
mysql_join_dependencies_install_targets
printf ';\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
sed '
y/\t/ /
/^knot /{
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 35b9419..64dfa1b 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -85,7 +85,7 @@ case "${action}" in
printf ' LEFT JOIN `build_slaves` ON `build_slaves`.`currently_building`=`to_build`.`ba_id`'
printf ';\n'
} | \
- mysql_run_query -N --raw --batch | \
+ mysql_run_query | \
tr '\t' ' ' | \
sort -k7,7 -k6,6 -k5,5 | \
sed '