diff options
author | Erich Eckner <git@eckner.net> | 2018-02-09 21:29:30 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-09 21:29:30 +0100 |
commit | d67478ccbef5f540b597303120b2fd47317680cd (patch) | |
tree | 1af05116b5f5818967152866c18a64a8e98c8ac3 | |
parent | b66e5381ea809a44773a52aeb76f11a04e359271 (diff) | |
download | builder-d67478ccbef5f540b597303120b2fd47317680cd.tar.xz |
bin/mysql-functions: mysql_remove_duplicate_build_order: use sub_pkgrel from old package
-rwxr-xr-x | bin/mysql-functions | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/mysql-functions b/bin/mysql-functions index cdc5f38..16c0141 100755 --- a/bin/mysql-functions +++ b/bin/mysql-functions @@ -912,9 +912,10 @@ mysql_repair_binary_packages_without_build_assignment() { mysql_remove_duplicate_build_order() { { - printf 'CREATE TEMPORARY TABLE `ren` (`old` BIGINT, `new` BIGINT, `repo` BIGINT);\n' - printf 'INSERT INTO `ren` (`old`,`new`,`repo`)' - printf ' SELECT `old`.`id`,`new`.`id`,`old`.`repository`' + printf 'CREATE TEMPORARY TABLE `ren`' + printf ' (`old` BIGINT, `new` BIGINT, `repo` BIGINT, `sub_pkgrel` BIGINT);\n' + printf 'INSERT INTO `ren` (`old`,`new`,`repo`,`sub_pkgrel`)' + printf ' SELECT `old`.`id`,`new`.`id`,`old`.`repository`,`old`.`sub_pkgrel`' printf ' FROM `binary_packages` as `old`' printf ' JOIN `binary_packages` as `new` ON' printf ' `old`.`%s`=`new`.`%s` AND' \ @@ -942,7 +943,7 @@ mysql_remove_duplicate_build_order() { printf 'UPDATE IGNORE `binary_packages`' printf ' JOIN `ren` ON `ren`.`new`=`binary_packages`.`id`' printf ' SET `binary_packages`.`repository`=`ren`.`repo`,' - printf ' `binary_packages`.`sub_pkgrel`=`binary_packages`.`sub_pkgrel`-1;\n' + printf ' `binary_packages`.`sub_pkgrel`=`ren`.`sub_pkgrel`;\n' } | \ ${mysql_command} } |