summaryrefslogtreecommitdiff
path: root/bin/db-update
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-20 11:00:34 +0200
committerErich Eckner <git@eckner.net>2017-06-20 11:00:34 +0200
commit93a52f30029e0943187baf10f04a7bf4b0560d29 (patch)
tree8634f6c224ac5a537cd40bf2598cea2721cda9b1 /bin/db-update
parent303e44cf2a88867fffd8e6599ff3f5632a6ca4b1 (diff)
downloadbuilder-93a52f30029e0943187baf10f04a7bf4b0560d29.tar.xz
bin/db-update: ignore duplicate versions if not relevant
Diffstat (limited to 'bin/db-update')
-rwxr-xr-xbin/db-update32
1 files changed, 23 insertions, 9 deletions
diff --git a/bin/db-update b/bin/db-update
index 3aced15..e37f19f 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -242,15 +242,29 @@ trap clean_up_lock_file EXIT
# sanity check
-if [ -n "$(
- ls "${work_dir}/package-states" | \
- grep '\.done$' | \
- sed 's|\(\.[^.]\+\)\{4\}$||' | \
- sort | \
- uniq -d)" ]; then
- >&2 echo 'Removing duplicates not yet implemented!'
- exit 42
-fi
+for ending in 'done' 'testing'; do
+ if [ "${ending}" = 'testing' ] && \
+ [ -z "${packages_to_stabilize}" ]; then
+ # if nothing is to be untested, we don't care about duplicate
+ # testing packages (and maybe a unstaging fixes this anyway)
+ continue
+ fi
+ if [ -n "$(
+ ls "${work_dir}/package-states" | \
+ grep "\.${ending}\$" | \
+ sed 's|\(\.[^.]\+\)\{4\}$||' | \
+ sort | \
+ uniq -d
+ )" ]; then
+ >&2 echo 'Removing duplicates not yet implemented:'
+ ls "${work_dir}/package-states" | \
+ grep "\.${ending}\$" | \
+ sed 's|\(\.[^.]\+\)\{4\}$||' | \
+ sort | \
+ uniq -d
+ exit 42
+ fi
+done
# packages which can't be un-staged because they're still dependencies
# of any job on the build-list