Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-02-19 09:19:08 +0100
committerErich Eckner <git@eckner.net>2019-02-19 09:19:08 +0100
commit5ce456cb6d54f6f7c29b1ad9642edc805b779f43 (patch)
treef8bd9247e9a4a4e44aa49dd55782127bfb9f04a6 /lib
parent99aedd94397fd88865c315cdcae59195ab03e399 (diff)
lib/mysql-functions: store in database, wether install_target is group or not
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions18
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` ('