summaryrefslogtreecommitdiff
path: root/bin/modify-package-state
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-15 11:17:38 +0100
committerErich Eckner <git@eckner.net>2018-03-15 11:17:38 +0100
commit912971f958e21dcc80b53af611c0e0cec8454e57 (patch)
tree8d2214d32c32db35f485418c49ac84bb8ec1c43e /bin/modify-package-state
parenta0ebdbe495c23d2cbbea2bc0e0f85815be5e364f (diff)
downloadbuilder-912971f958e21dcc80b53af611c0e0cec8454e57.tar.xz
bin/modify-package-state: lock package database
Diffstat (limited to 'bin/modify-package-state')
-rwxr-xr-xbin/modify-package-state6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/modify-package-state b/bin/modify-package-state
index 9b0571b..6a6716f 100755
--- a/bin/modify-package-state
+++ b/bin/modify-package-state
@@ -128,6 +128,12 @@ if ! flock -s -n 9; then
exit
fi
+exec 8> "${package_database_lock_file}"
+if ! flock -n 8; then
+ >&2 echo 'Cannot get package-database lock.'
+ exit
+fi
+
while read -r package reason; do
case "${action}" in
'faulty'|'tested')