Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
dbscripts
Commits
998155b1
Verified
Commit
998155b1
authored
Sep 01, 2020
by
Eli Schwartz
Committed by
Morten Linderud
Nov 20, 2021
Browse files
wip: debug: lock/unlock both repos at once
parent
be1e7c9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
db-functions
View file @
998155b1
...
...
@@ -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
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment