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>2020-02-26 13:25:29 +0100
committerErich Eckner <git@eckner.net>2020-02-26 13:25:29 +0100
commite4d15e3848eb16803e462ed0050978efde4939c0 (patch)
tree5d3be00e48938fe105a6f99aab163dff1bcdb190 /lib
parent910b33046a51a3fe099a3613fd67625e1779eb52 (diff)
lib/mysql-functions: mysql_join_install_target_providers_dependencies_with_versions() and mysql_join_dependencies_install_target_providers_with_versions() can now use pre-joined versions
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 9f0ed94..b44a229 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -1402,27 +1402,36 @@ done
# mysql_join_install_target_providers_dependencies_with_versions() and
# mysql_join_dependencies_install_target_providers_with_versions() also
-# join via `versions`
+# join via `versions`, optional 3rd argument cancels 1st version-join,
+# optional 4th argument cancels 2nd version-join
mysql_join_install_target_providers_dependencies_with_versions() {
mysql_join_install_target_providers_dependencies "$1" "$2"
- mysql_join_install_target_providers_versions "$1" "${1:-install_target_providers}_versions"
- mysql_join_dependencies_versions "$2" "${2:-dependencies}_versions"
+ if [ -z "$3" ]; then
+ mysql_join_install_target_providers_versions "$1" "${1:-install_target_providers}_versions"
+ fi
+ if [ -z "$4" ]; then
+ mysql_join_dependencies_versions "$2" "${2:-dependencies}_versions"
+ fi
printf ' AND '
mysql_query_ordering_correct \
- '`'"${2:-dependencies}_versions"'`.`order`' \
- '`'"${1:-install_target_providers}_versions"'`.`order`' \
+ '`'"${4:-${2:-dependencies}_versions}"'`.`order`' \
+ '`'"${3:-${1:-install_target_providers}_versions}"'`.`order`' \
'`'"${2:-dependencies}"'`.`version_relation`'
}
mysql_join_dependencies_install_target_providers_with_versions() {
local relation
mysql_join_dependencies_install_target_providers "$1" "$2"
- mysql_join_install_target_providers_versions "$2" "${2:-install_target_providers}_versions"
- mysql_join_dependencies_versions "$1" "${1:-dependencies}_versions"
+ if [ -z "$4" ]; then
+ mysql_join_install_target_providers_versions "$2" "${2:-install_target_providers}_versions"
+ fi
+ if [ -z "$3" ]; then
+ mysql_join_dependencies_versions "$1" "${1:-dependencies}_versions"
+ fi
printf ' AND '
mysql_query_ordering_correct \
- '`'"${1:-dependencies}_versions"'`.`order`' \
- '`'"${2:-install_target_providers}_versions"'`.`order`' \
+ '`'"${3:-${1:-dependencies}_versions}"'`.`order`' \
+ '`'"${4:-${2:-install_target_providers}_versions}"'`.`order`' \
'`'"${1:-dependencies}"'`.`version_relation`'
}