Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common-functions7
-rwxr-xr-xlib/mysql-functions19
2 files changed, 8 insertions, 18 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 740c266..ba434ad 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -501,11 +501,8 @@ remove_old_package_versions() {
"$(printf '%s' "${repository}" | base64 -w0)"
printf ';\n'
} | \
- mysql_run_query --raw --batch | \
- sed '
- /^\S\+\sCONCAT(/d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
+ tr '\t' ' ' | \
expand_version 4 | \
sort -k4V,4 -k3r,3 | \
shrink_version 4 | \
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 6cbc502..3e7e19f 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -668,9 +668,8 @@ mysql_sanity_check() {
'a' 'b'
printf ';\n'
} | \
- mysql_run_query --raw --batch | \
+ mysql_run_query -N --raw --batch | \
sed '
- /^CONCAT("/d
s,^,<font color="#FF0000">,
s,$,</font>,
'
@@ -699,9 +698,8 @@ mysql_sanity_check() {
mysql_join_binary_packages_repositories
printf ' WHERE `repositories`.`is_on_master_mirror`'
} | \
- mysql_run_query --batch | \
+ mysql_run_query -N --raw --batch | \
sed '
- 1d
s,\t,/,
s,\t,-,
s,\t,:,
@@ -730,11 +728,8 @@ mysql_find_build_assignment_loops() {
mysql_join_binary_packages_repositories 'packages_dependent' 'repositories_dependent'
printf ' WHERE `repositories_dependent`.`name`="build-list" AND `repositories_dependency`.`name`="build-list"'
} | \
- mysql_run_query --raw --batch | \
- sed '
- 1d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
+ tr '\t' ' ' | \
tsort 2>&1 >/dev/null | \
sed 's/^tsort:\s*//' | \
{
@@ -910,8 +905,7 @@ mysql_repair_binary_packages_without_build_assignment() {
mysql_join_binary_packages_architectures
printf ' WHERE `binary_packages`.`build_assignment`<0'
} | \
- mysql_run_query --raw --batch | \
- sed '1d' | \
+ mysql_run_query -N --raw --batch | \
while read -r id pkgname arch; do
pkgname=$(
printf '%s' "${pkgname}" | \
@@ -939,8 +933,7 @@ mysql_repair_binary_packages_without_build_assignment() {
printf ' WHERE `package_sources`.`pkgbase`=from_base64("%s")' \
"$(printf '%s' "${pkgname}" | base64 -w0)"
} | \
- mysql_run_query --raw --batch | \
- sed '1d' | \
+ mysql_run_query -N --raw --batch | \
grep -qvxF '0'; then
pkgbase="${pkgname}"
fi