index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-09-17 15:52:45 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-17 15:52:45 +0200 |
commit | e0ab9252b8fe502b620f62278f8deff287c7e729 (patch) | |
tree | 57da7c2ddcda57ae5630adcb11e58739ee0470ce | |
parent | 891b045f1801a4c646631ea90be10a94690ccf9f (diff) |
-rwxr-xr-x | lib/mysql-functions | 34 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index c596b38..dd17fde 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -292,16 +292,30 @@ mysql_generate_package_metadata() { grep '^pkgname = ' "${temp_dir}/SRCINFO" | \ cut -d' ' -f3 | \ while read -r pkgname; do - sed -n ' - /^pkgbase = \|^pkgname = '"$(str_to_regex "${pkgname}")"'$/,/^$/ { - s/^pkgname/\t\0/ - /^\S/d - /^\s*$/d - s/^\s*// - p - } - ' "${temp_dir}/SRCINFO" > \ - "${temp_dir}/SRCINFO.tmp" + # iff this pkgname defines some arch, ... + if sed -n ' + /^pkgname = '"$(str_to_regex "${pkgname}")"'$/,/^$/ p + ' "${temp_dir}/SRCINFO" | \ + grep -q '^\sarch = '; then + # ... it will override all archs defined in pkgbase + sed ' + /^pkgbase = /,/^$/ { + /^\sarch = /d + } + ' "${temp_dir}/SRCINFO" + else + cat "${temp_dir}/SRCINFO" + fi | \ + sed -n ' + /^pkgbase = \|^pkgname = '"$(str_to_regex "${pkgname}")"'$/,/^$/ { + s/^pkgname/\t\0/ + /^\S/d + /^\s*$/d + s/^\s*// + p + } + ' > \ + "${temp_dir}/SRCINFO.tmp" epoch=$( { |