Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/db-update
diff options
context:
space:
mode:
Diffstat (limited to 'bin/db-update')
-rwxr-xr-xbin/db-update15
1 files changed, 5 insertions, 10 deletions
diff --git a/bin/db-update b/bin/db-update
index 196527e..e54e2bf 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -332,6 +332,10 @@ mysql_query_update_replaced_bpir() {
printf ' FROM `binary_packages_in_repositories`'
mysql_join_binary_packages_in_repositories_repositories
printf ' AND `repositories`.`is_on_master_mirror`'
+ printf ' AND `repositories`.`stability`=%s' \
+ "${source_stability_id}"
+ printf ' AND `repositories`.`architecture`=%s;\n' \
+ "${arch_id}"
mysql_join_repositories_architectures
mysql_join_binary_packages_in_repositories_binary_packages
printf ' JOIN `binary_packages` AS `f_bp`'
@@ -367,16 +371,7 @@ mysql_query_update_replaced_bpir() {
else # ${force_every_pkg}
printf ';\n'
fi
- printf 'DELETE `moveable_bpir`'
- printf ' FROM `moveable_bpir`'
- printf ' JOIN `binary_packages_in_repositories`'
- printf ' ON `binary_packages_in_repositories`.`id`=`moveable_bpir`.`id`'
- mysql_join_binary_packages_in_repositories_binary_packages
- mysql_join_binary_packages_in_repositories_repositories
- printf ' WHERE `repositories`.`stability`!=%s' \
- "${source_stability_id}"
- printf ' OR `repositories`.`architecture`!=%s;\n' \
- "${arch_id}"
+
printf 'UPDATE `moveable_bpir`'
printf ' JOIN `binary_packages_in_repositories`'
printf ' ON `binary_packages_in_repositories`.`id`=`moveable_bpir`.`id`'