index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | lib/mysql-functions | 27 |
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`' } |