diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/mysql-functions | 18 |
1 files changed, 13 insertions, 5 deletions
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` (' |