From b932ed76a9c7b8ecb1d50962295a5c2f34c06ab9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 28 Jul 2017 22:35:30 +0200 Subject: bin/common-functions: bugfix, cleanup --- bin/common-functions | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/common-functions b/bin/common-functions index 8c7d396..4dc0d07 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -150,10 +150,13 @@ generate_package_metadata() { fi # otherwise this just calls for trouble - sed -i '/^[^=]*=\s*$/d' "${file_prefix}.SRCINFO" + sed -i ' + /^[^=]*=\s*$/d + s/_i686\(\s*=\)/\1/ + ' "${file_prefix}.SRCINFO" # extract "groups" = groups \cup provides - grep "$(printf '^\t\\(groups\\|provides\\(_i686\\)\\?\\) = ')" "${file_prefix}.SRCINFO" | \ + grep "$(printf '^\t\\(groups\\|provides\\) = ')" "${file_prefix}.SRCINFO" | \ cut -d= -f2 | \ sed 's|^\s\+||; s|[<>]$||' | \ sort -u > \ @@ -174,8 +177,8 @@ generate_package_metadata() { # extract "depends" = makedepends \cup checkdepends \cup depends \cup \{ base, base-devel \} ( printf 'all_depend = %s\n' 'base' 'base-devel' - sed -n "$(printf '/^pkgname = /q;/^\tdepends\\(_i686\\)\\? = /p')" "${file_prefix}.SRCINFO" - grep "$(printf '^\t\\(makedepends\\|checkdepends\\)\\(_i686\\)\\? = ')" "${file_prefix}.SRCINFO" + sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO" + grep "$(printf '^\t\\(makedepends\\|checkdepends\\) = ')" "${file_prefix}.SRCINFO" ) | \ cut -d= -f2 | \ sed 's|^\s\+||; s|[<>]$||' | \ @@ -525,7 +528,7 @@ insert_break_loops_orders() { append_architectures() { local PKGBUILD="$1" - sed -i '/^arch=(/s/(/(i686 /' + sed -i '/^arch=(/s/(/(i686 /' "${PKGBUILD}" } # find_newest_of_git_revisions -- cgit v1.2.3-54-g00ecf