summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdb-import-pkg7
1 files changed, 4 insertions, 3 deletions
diff --git a/db-import-pkg b/db-import-pkg
index 8bb4441..ad1bfa6 100755
--- a/db-import-pkg
+++ b/db-import-pkg
@@ -222,7 +222,6 @@ main() {
# be. We now create ${WORKDIR}/dif/ describing how to get
# from point A to point B.
cat "${WORKDIR}"/old/*-*.txt | sort -u > "${WORKDIR}/old/all.txt"
- cat "${WORKDIR}"/new/*-*.txt | sort -u > "${WORKDIR}/new/all.txt"
# db-move <repo-from> <repo-to> <pkgname|pkgbase> ...
#
# db-move doesn't allow us to limit the operation to a
@@ -253,9 +252,11 @@ main() {
done
# db-remove <repo> <arch> <pkgname|pkgbase> ...
for tag in "${ARCHTAGS[@]}"; do
+ # pkgnames (that need to leave this tag) AND (haven't
+ # already been removed from this tag by db-move).
comm -23 \
- "${WORKDIR}/old/${tag}.txt" \
- "${WORKDIR}/new/all.txt" \
+ <(cut -d' ' -f1 -- "${WORKDIR}/old/${tag}.txt" | sort -u) \
+ <(cut -d' ' -f1 -- "${WORKDIR}/new/${tag}.txt" "${WORKDIR}/dif/move:${tag}":*.txt | sort -u) \
> "${WORKDIR}/dif/remove:${tag}.txt"
done