Commit 198e7a07 authored by Holger Levsen's avatar Holger Levsen

reproducible Debian: add support for locking

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 084f95eb
......@@ -79,9 +79,19 @@ cleanup_all() {
trap cleanup_all INT TERM EXIT
rm -f *.lock # this is a tiny bit hackish, but also an elegant way to get rid of old locks...
# (locks are held for 30s only anyway and there is an 3/60000th chance of a race condition only anyway)
for package in $packages ; do
cd $SHA1DIR
echo
LOCK="$SHA1DIR/${package}.lock"
if [ -e $LOCK ] ; then
echo "$(date -u) - skipping locked package $package"
continue
else
touch $LOCK
fi
echo "$(date -u) - checking whether we have seen the .deb for $package before"
version=$(grep-dctrl -X -P ${package} -s version -n $PACKAGES)
arch=$(grep-dctrl -X -P ${package} -s Architecture -n $PACKAGES)
......@@ -112,6 +122,7 @@ for package in $packages ; do
else
echo "$(date -u) - UNREPRODUCIBLE: $package_file: $SHA1SUM_PKG on ftp.debian.org, but nowhere else."
fi
rm -f $LOCK
done | tee $log
cleanup_all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment