Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions44
1 files changed, 9 insertions, 35 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 0de438f..6619968 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -673,13 +673,9 @@ mysql_sanity_check() {
for arch in 'i686'; do
for dir in $(ls_master_mirror "${arch}"); do
ls_master_mirror "${arch}/${dir}" | \
- sed -n '
- s/\.pkg\.tar\.xz$//
- T
- s/-\([0-9]\+\)-\([^-]\+\)$/-\1.0-\2/
- s/-\([^-:]\+-[^-]\+-[^-]\+\)$/-0:\1/
+ sed '
+ /\.pkg\.tar\.xz$/!d
s|^|'"${arch}"'/'"${dir}"'/|
- p
'
done
done | \
@@ -687,15 +683,9 @@ mysql_sanity_check() {
"${temp_dir}/master-mirror-listing"
{
- printf 'SELECT `r_a`.`name`,`repositories`.`name`,'
- printf '`binary_packages`.`%s`,' \
- 'pkgname' \
- 'epoch' \
- 'pkgver' \
- 'pkgrel' \
- 'sub_pkgrel'
- printf '`architectures`.`name`'
- printf ' FROM `binary_packages_in_repositories`'
+ printf 'SELECT CONCAT(`r_a`.`name`,"/",`repositories`.`name`,"/",'
+ mysql_package_name_query
+ printf ') FROM `binary_packages_in_repositories`'
mysql_join_binary_packages_in_repositories_binary_packages
mysql_join_binary_packages_architectures
mysql_join_binary_packages_in_repositories_repositories
@@ -721,12 +711,9 @@ mysql_sanity_check() {
# shellcheck disable=SC2041
ls_master_mirror 'pool' | \
- sed -n '
- s/\.pkg\.tar\.xz\(\.sig\)\?$//
- T
- s/-\([0-9]\+\)-\([^-]\+\)$/-\1.0-\2/
- s/-\([^-:]\+-[^-]\+-[^-]\+\)$/-0:\1/
- p
+ sed '
+ s/\.sig$//
+ /\.pkg\.tar\.xz$/ !d
' | \
sort | \
uniq -c | \
@@ -736,13 +723,7 @@ mysql_sanity_check() {
{
printf 'SELECT '
- printf '`binary_packages`.`%s`,' \
- 'pkgname' \
- 'epoch' \
- 'pkgver' \
- 'pkgrel' \
- 'sub_pkgrel'
- printf '`architectures`.`name`'
+ mysql_package_name_query
printf ' FROM `binary_packages`'
mysql_join_binary_packages_architectures
printf ' WHERE NOT EXISTS ('
@@ -758,13 +739,6 @@ mysql_sanity_check() {
printf ')'
} | \
mysql_run_query | \
- sed '
- s,\t,-,
- s,\t,:,
- s,\t,-,
- s,\t,.,
- s,\t,-,
- ' | \
sort > \
"${temp_dir}/mysql-packages-pool"