summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-09 10:28:52 +0100
committerErich Eckner <git@eckner.net>2018-03-09 10:28:52 +0100
commitb5bacd8de3c56f996f8fdd27365e735e71e0c152 (patch)
treec6bde9ee4bf9637879c266bf59797cb89527a3e0 /bin
parent920f3351e045c9e2d9aa18706dc86557dd59cc5d (diff)
downloadbuilder-b5bacd8de3c56f996f8fdd27365e735e71e0c152.tar.xz
bin/db-update: use repo-copy to avoid needing to pull all moving packages
Diffstat (limited to 'bin')
-rwxr-xr-xbin/db-update17
1 files changed, 5 insertions, 12 deletions
diff --git a/bin/db-update b/bin/db-update
index d79cc37..a1622ec 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -202,19 +202,12 @@ for source_stability in 'testing' 'staging'; do
"${tmp_dir}/rm"
# delete and add moved packages
- mkdir "${tmp_dir}/transit"
while read -r pkgname from_repo to_repo; do
- ${master_mirror_rsync_command} \
- "${master_mirror_rsync_directory}/i686/${from_repo}/${pkgname}" \
- "${master_mirror_rsync_directory}/i686/${from_repo}/${pkgname}.sig" \
- "${tmp_dir}/transit/"
- cd "${tmp_dir}/dbs/${from_repo}"
- repo-remove -q "${from_repo}.db.tar.gz" "${pkgname%-*-*-*}"
- cd "${tmp_dir}/dbs/${to_repo}"
- repo-add -q "${to_repo}.db.tar.gz" "${tmp_dir}/transit/${pkgname}"
- rm \
- "${tmp_dir}/transit/${pkgname}" \
- "${tmp_dir}/transit/${pkgname}.sig"
+ repo-copy \
+ "${tmp_dir}/dbs/${from_repo}/${from_repo}.db.tar.gz" \
+ "${tmp_dir}/dbs/${to_repo}/${to_repo}.db.tar.gz" \
+ "${pkgname%-*}"
+ repo-remove -q "${tmp_dir}/dbs/${from_repo}/${from_repo}.db.tar.gz" "${pkgname%-*-*-*}"
done < \
"${tmp_dir}/mv"