index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-08-21 11:08:53 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-08-21 11:08:53 +0200 |
commit | 71b69213b1600694a3dac25c062f9f39a6b0f143 (patch) | |
tree | 8e8b0c243b8ae0b83b3cc30c452f86cb235b8888 /lib/common-functions | |
parent | 1b47369e3b43e4b8b6c6f095e31ce11faf886b8a (diff) |
-rwxr-xr-x | lib/common-functions | 28 |
diff --git a/lib/common-functions b/lib/common-functions index 59576fb..501a5d0 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -1079,3 +1079,31 @@ extract_dependencies_from_package() { | tr '[:upper:]' '[:lower:]' \ | sort -u } + +# expand_blacklist_architectures $tmp_file +# expand the architecture of the blacklisted packages given on stdin as +# lines +# $arch<tab>$pkgbase/$pkgname/$whatever +expand_blacklist_architectures() { + # shellcheck disable=SC2016 + { + printf 'SELECT `superior`.`name`,`inferior`.`name`' + printf ' FROM `architectures` AS `inferior`' + printf ' JOIN `architecture_compatibilities`' + printf ' ON `architecture_compatibilities`.`built_for`=`inferior`.`id`' + printf ' JOIN `architectures` AS `superior`' + printf ' ON `architecture_compatibilities`.`runs_on`=`superior`.`id`' + # "any" has a special role - it should be regarded as *inferior* to + # all architectures + printf ' WHERE `superior`.`name`!="any";\n' + printf 'SELECT "any",`architectures`.`name`' + printf ' FROM `architectures`;\n' + } \ + | mysql_run_query \ + | grep -v '\sany$' \ + | sort -k1,1 \ + > "$1" + sort -k1,1 \ + | join -1 1 -2 1 -o 1.2,2.2 "$1" - \ + | sort -u +} |