index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-05-20 19:05:14 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-05-20 19:05:14 +0200 |
commit | 1e2562563ad2d7dd1c3c6be6d80d0241ea330e97 (patch) | |
tree | 921d1dbf01763fdb886928b780935890c81fd451 | |
parent | d9a8257a0275f24f93e6f21e6001fc19fbf448bd (diff) |
-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 |