Verified Commit 998155b1 authored by Eli Schwartz's avatar Eli Schwartz Committed by Morten Linderud
Browse files

wip: debug: lock/unlock both repos at once

parent be1e7c9d
......@@ -109,7 +109,14 @@ trap cleanup EXIT
#repo_lock <repo-name> <arch> [timeout]
repo_lock () {
repo_lock() {
local repo base=${1}; shift
for repo in ${base} ${base}-debug; do
_repo_lock ${repo} "${@}"
done
}
_repo_lock () {
local LOCKDIR="$TMPDIR/.repolock.$1.$2"
local DBLOCKFILE="${FTP_BASE}/${1}/os/${2}/${1}${DBEXT}.lck"
local _count
......@@ -152,7 +159,15 @@ repo_lock () {
return 1
}
repo_unlock () { #repo_unlock <repo-name> <arch>
#repo_unlock <repo-name> <arch>
repo_unlock () {
local repo base=${1}; shift
for repo in ${base} ${base}-debug; do
_repo_unlock ${repo} "${@}"
done
}
_repo_unlock () {
local LOCKDIR="$TMPDIR/.repolock.$1.$2"
if [[ ! -d $LOCKDIR ]]; then
warning "Repo lock [%s] (%s) was not locked!" "$1" "$2"
......
Supports Markdown
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