Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 920a825..c975fdc 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -384,7 +384,7 @@ mysql_generate_package_metadata() {
"${temp_dir}/database-input"
printf 'SET @sub_pkgrel=('
- printf 'SELECT MAX(`binary_packages`.`sub_pkgrel`)'
+ printf 'SELECT IFNULL(MAX(`binary_packages`.`sub_pkgrel`)+1,0)'
printf ' FROM `links`'
printf ' JOIN `architectures`'
printf ' ON `architectures`.`name`=`links`.`architecture`'
@@ -394,6 +394,11 @@ mysql_generate_package_metadata() {
'epoch' 'epoch' \
'pkgver' 'pkgver' \
'pkgrel' 'pkgrel'
+ printf ' LEFT'
+ mysql_join_binary_packages_binary_packages_in_repositories
+ printf ' WHERE `binary_packages_in_repositories`.`repository`!=%s' \
+ "${repository_ids__any_build_list}"
+ printf ' OR `binary_packages_in_repositories`.`repository` IS NULL'
printf ');\n'
printf 'INSERT IGNORE INTO `build_assignments` ('