Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/seed-build-list
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-01 09:05:51 +0100
committerErich Eckner <git@eckner.net>2018-03-01 09:05:51 +0100
commit496c571cd233a8646351ba241c3119ceaf2b8063 (patch)
tree3018e0a5a4ed78158c57a5b09d4b9e87fd3246d5 /bin/seed-build-list
parent6047f2686cfe623e08fbaf4eae0a552ded731eb1 (diff)
use "mysql -N" instead of cumbersome sedding
Diffstat (limited to 'bin/seed-build-list')
-rwxr-xr-xbin/seed-build-list13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list
index b9ae193..def9d56 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -125,9 +125,8 @@ if [ -s "${tmp_dir}/mirrors" ]; then
printf ' FROM `binary_packages`'
mysql_join_binary_packages_architectures
} | \
- mysql_run_query --raw --batch | \
+ mysql_run_query -N --raw --batch | \
sed '
- 1d
s/^\(.*\)-\([^-]\+-[^-]\+\)-\([^-]\+\)/ours \2 \3 \1/
'
} | \
@@ -206,8 +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 --raw --batch | \
- sed '1d' | \
+ mysql_run_query -N --raw --batch | \
while read -r pkgname; do
content=$(
curl -Ss 'https://www.archlinux.org/packages/search/json/?name='"${pkgname}" | \
@@ -294,12 +292,9 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V
printf ' WHERE `ignore_packages`.`pkgname`=`binary_packages`.`pkgname`'
printf ');\n'
} | \
- mysql_run_query --raw --batch | \
+ mysql_run_query -N --raw --batch | \
sort -u | \
- sed '
- y/\t/ /
- / [0-9a-f]\{40\} [0-9a-f]\{40\} /!d
- ' | \
+ tr '\t' ' ' | \
if ${update}; then
# always block if locked
exec 9> "${build_list_lock_file}"