index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2020-02-26 13:25:29 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-26 13:25:29 +0100 |
commit | e4d15e3848eb16803e462ed0050978efde4939c0 (patch) | |
tree | 5d3be00e48938fe105a6f99aab163dff1bcdb190 /lib | |
parent | 910b33046a51a3fe099a3613fd67625e1779eb52 (diff) |
-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`' } |