From 5ce456cb6d54f6f7c29b1ad9642edc805b779f43 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 19 Feb 2019 09:19:08 +0100 Subject: lib/mysql-functions: store in database, wether install_target is group or not --- lib/mysql-functions | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/mysql-functions b/lib/mysql-functions index 950e4ac..4f146dd 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -326,7 +326,9 @@ mysql_generate_package_metadata() { sed ' s/^arch = \S\+$/arch/ t - s/^\(groups\|provides\) = /provides\t/ + s/^provides = /provides\t/ + t mangle_version + s/^groups = /groups\t/ t mangle_version s/^makedepends = /makedepends\t/ t mangle_version @@ -547,17 +549,23 @@ mysql_generate_package_metadata() { printf ' AND `links`.`install_target_version` IS NOT NULL' printf ';\n' - for link in 'provides' 'makedepends' 'checkdepends' 'rundepends'; do + for link in 'groups' 'provides' 'makedepends' 'checkdepends' 'rundepends'; do case "${link}" in - 'provides') + 'groups'|'provides') printf 'INSERT IGNORE INTO `install_target_providers` (' printf '`package`,' printf '`install_target`,' - printf '`version`' + printf '`version`,' + printf '`install_target_is_group`' printf ') SELECT' printf ' `binary_packages`.`id`,' printf '`install_targets`.`id`,' - printf '`versions`.`id`' + printf '`versions`.`id`,' + if [ "${link}" = 'group' ]; then + printf '1' + else + printf '0' + fi ;; 'makedepends'|'checkdepends'|'rundepends') printf 'INSERT IGNORE INTO `dependencies` (' -- cgit v1.2.3-70-g09d2