index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | lib/mysql-functions | 12 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index 9cf36fe..9be8521 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1276,6 +1276,18 @@ mysql_query_select_pkgbase_and_revision() { mysql_join_package_sources_upstream_repositories } +# mysql_package_version_query [binary_packages] +# print a mysql query of the full version of a package + +mysql_package_version_query() { + local bp_name="${1:-binary_packages}" + printf 'CONCAT(' + printf 'IF(`%s`.`epoch`=0,"",CONCAT(`%s`.`epoch`,":")),' "${bp_name}" "${bp_name}" + printf '`%s`.`pkgver`,"-",' "${bp_name}" + printf '`%s`.`pkgrel`,' "${bp_name}" + printf ')' +} + # mysql_package_name_query [binary_packages] [architectures] [compressions] # print a mysql query of the full name of a package file |