Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-master-status-from-mysql
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build-master-status-from-mysql')
-rwxr-xr-xbin/build-master-status-from-mysql46
1 files changed, 12 insertions, 34 deletions
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql
index fa54177..d1985e7 100755
--- a/bin/build-master-status-from-mysql
+++ b/bin/build-master-status-from-mysql
@@ -27,11 +27,8 @@ fi
mysql_join_binary_packages_repositories
printf ' WHERE `repositories`.`name`="build-list"'
} | \
- mysql_run_query --batch | \
- sed '
- 1d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
+ tr '\t' ' ' | \
sort > \
"${tmp_dir}/build-list.mysql"
sort "${work_dir}/build-list" > \
@@ -48,11 +45,8 @@ sort "${work_dir}/build-list" > \
mysql_join_build_assignments_package_sources
mysql_join_package_sources_upstream_repositories
} | \
- mysql_run_query --raw --batch | \
- sed '
- 1d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
+ tr '\t' ' ' | \
sort > \
"${tmp_dir}/locked.mysql"
find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 -name '*.locked' -printf '%f\n' | \
@@ -72,11 +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 --batch | \
- sed '
- 1d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
sort > \
"${tmp_dir}/deletion-list.mysql"
sort "${work_dir}/deletion-list" > \
@@ -90,11 +80,7 @@ sort "${work_dir}/deletion-list" > \
mysql_join_build_assignments_build_dependency_loops
printf ';\n'
} | \
- mysql_run_query --batch | \
- sed '
- 1d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
sort > \
"${tmp_dir}/loops.mysql"
find "${work_dir}/build-list.loops" -regextype grep -mindepth 1 -maxdepth 1 \
@@ -121,9 +107,8 @@ 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 --batch | \
+ mysql_run_query -N --raw --batch | \
sed '
- 1d
s/^\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)$/\1-\2:\3-\4.\5-\6.pkg.tar.xz/
' | \
sort -u > \
@@ -156,9 +141,8 @@ 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 --batch | \
+ mysql_run_query -N --raw --batch | \
sed '
- 1d
s/^\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)$/\1-\2:\3-\4.\5-\6.pkg.tar.xz/
' | \
sort -u > \
@@ -190,11 +174,8 @@ 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 --raw --batch | \
- sed '
- 1d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
+ tr '\t' ' ' | \
sort -u > \
"${tmp_dir}/build-dependencies.mysql"
{
@@ -210,11 +191,8 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
mysql_join_package_sources_build_assignments
mysql_join_build_assignments_binary_packages
} | \
- mysql_run_query --raw --batch | \
- sed '
- 1d
- y/\t/ /
- ' | \
+ mysql_run_query -N --raw --batch | \
+ 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
# TODO: consider versions dependencies, too