Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-04 14:40:13 +0200
committerErich Eckner <git@eckner.net>2018-05-04 14:40:13 +0200
commitf7300080d27c5e49f9220f803ca81b68eca04ccd (patch)
tree1edc65839d6694b010ddc5defb52fb765adfdcdd
parent2f32cd172d264331bc1a19c59d3637114e049c17 (diff)
lib/mysql-functions: small cleanup
-rwxr-xr-xlib/mysql-functions12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index e830cf5..e6e76fb 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -331,6 +331,7 @@ mysql_generate_package_metadata() {
}
)
+ # iterate over all pkgnames
grep '^pkgname = ' "${temp_dir}/SRCINFO" | \
cut -d' ' -f3 | \
while read -r pkgname; do
@@ -347,6 +348,7 @@ mysql_generate_package_metadata() {
' "${temp_dir}/SRCINFO" > \
"${temp_dir}/BINARYINFO.${pkgname64}"
+ # iterate over all archs
grep '^arch = ' "${temp_dir}/BINARYINFO.${pkgname64}" | \
cut -d' ' -f3 | \
while read -r arch; do
@@ -360,18 +362,21 @@ mysql_generate_package_metadata() {
"${temp_dir}/ARCHINFO ${pkgname64} ${arch64}"
done
done
+
find "${temp_dir}" -mindepth 1 -maxdepth 1 -name 'ARCHINFO * *' -printf '%f\n' | \
while read -r _ pkgname arch; do
pkgver=$(
grep '^pkgver = ' "${temp_dir}/ARCHINFO ${pkgname} ${arch}" | \
cut -d' ' -f3 | \
- base64_encode_each
+ tr -d '\n' | \
+ base64 -w0
)
pkgrel=$(
grep '^pkgrel = ' "${temp_dir}/ARCHINFO ${pkgname} ${arch}" | \
cut -d' ' -f3 | \
sed 's/\.[0-9]\+$//' | \
- base64_encode_each
+ tr -d '\n' | \
+ base64 -w0
)
epoch=$(
{
@@ -379,7 +384,8 @@ mysql_generate_package_metadata() {
echo 'epoch = 0'
} | \
cut -d' ' -f3 | \
- base64_encode_each
+ tr -d '\n' | \
+ base64 -w0
)
provides=$(
grep '^\(groups\|provides\) = ' "${temp_dir}/ARCHINFO ${pkgname} ${arch}" | \