index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-07-26 15:15:03 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-26 15:15:03 +0200 |
commit | c7b9db34c9563a460e3f2eaa63978fdf3938cfeb (patch) | |
tree | b40f407a011a2e6f2fd27a39db16e7213cded080 | |
parent | bab7e4ea534004ba47c7206a89490ab3afc001aa (diff) |
-rwxr-xr-x | bin/get-assignment | 24 | ||||
-rwxr-xr-x | lib/mysql-functions | 28 |
diff --git a/bin/get-assignment b/bin/get-assignment index f3028e2..c84fdb3 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -139,29 +139,7 @@ fi next_building=$( # shellcheck disable=SC2016 { - # We force the following build order of the tool-chain: - # linux-api-headers->glibc->binutils->gcc->binutils->glibc - for suffix in '' '_copy'; do - printf 'CREATE TEMPORARY TABLE `toolchain_order%s` (' \ - "${suffix}" - printf '`number` SMALLINT,' - printf '`pkgbase` VARCHAR(64),' - printf 'PRIMARY KEY `number`(`number`)' - printf ');\n' - done - printf 'INSERT INTO `toolchain_order` (`number`,`pkgbase`) VALUES ' - printf '(%s,"%s"),' \ - 0 'linux-api-headers' \ - 1 'glibc' \ - 2 'binutils' \ - 3 'gcc' \ - 4 'binutils' \ - 5 'glibc' | \ - sed 's/,$/;\n/' - printf 'INSERT INTO `toolchain_order_copy` (`number`,`pkgbase`)' - printf ' SELECT `toolchain_order`.`number`,`toolchain_order`.`pkgbase`' - printf ' FROM `toolchain_order`;\n' - + mysql_query_create_toolchain_order printf 'SELECT `q`.`ba_id` FROM' printf '(' printf 'SELECT ' diff --git a/lib/mysql-functions b/lib/mysql-functions index 4a04bd1..a4cca4e 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1114,3 +1114,31 @@ mysql_query_and_delete_unneeded_binary_packages() { printf ' WHERE `binary_packages_in_repositories`.`package`=`binary_packages`.`id`' printf ');\n' } + +# mysql_query_create_toolchain_order +# write query, creating `toolchain_order` and `toolchain_order_copy` +# temporary tables +mysql_query_create_toolchain_order() { + # We force the following build order of the tool-chain: + # linux-api-headers->glibc->binutils->gcc->binutils->glibc + for suffix in '' '_copy'; do + printf 'CREATE TEMPORARY TABLE `toolchain_order%s` (' \ + "${suffix}" + printf '`number` SMALLINT,' + printf '`pkgbase` VARCHAR(64),' + printf 'PRIMARY KEY `number`(`number`)' + printf ');\n' + done + printf 'INSERT INTO `toolchain_order` (`number`,`pkgbase`) VALUES ' + printf '(%s,"%s"),' \ + 0 'linux-api-headers' \ + 1 'glibc' \ + 2 'binutils' \ + 3 'gcc' \ + 4 'binutils' \ + 5 'glibc' | \ + sed 's/,$/;\n/' + printf 'INSERT INTO `toolchain_order_copy` (`number`,`pkgbase`)' + printf ' SELECT `toolchain_order`.`number`,`toolchain_order`.`pkgbase`' + printf ' FROM `toolchain_order`;\n' +} |