Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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`'
}