From b93c9bd79f8f40af59bd497727aa9c8bcf13010c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 4 May 2018 14:27:55 +0200 Subject: lib/mysql-functions: use precompiled list of arch-build_assignments relations --- lib/mysql-functions | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/mysql-functions b/lib/mysql-functions index 3c45edc..bc0d26f 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -319,17 +319,16 @@ mysql_generate_package_metadata() { # shellcheck disable=SC2034 # select any specific arch (which will be building the 'any' part of a split package) any_arch=$( - { - sed -n ' - s/^\tarch = // - T - p - ' "${temp_dir}/SRCINFO" | \ - sort -r | \ - grep -vxFm 1 'any' || \ - echo 'any' - } | \ - base64_encode_each + cut -f1 < \ + "${tmp_dir}/build-assignments.id" | \ + grep -vxFm 1 "$( + printf '%s' 'any' | \ + base64 -w0 + )" || \ + { + printf '%s' 'any' | \ + base64 -w0 + } ) grep '^pkgname = ' "${temp_dir}/SRCINFO" | \ -- cgit v1.2.3-70-g09d2