summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2015-05-25 01:19:43 -0600
committerLuke Shumaker <lukeshu@parabola.nu>2018-10-07 19:11:28 -0400
commite5a7e683373c7a2507f90c5e73ba6fc6d007d13e (patch)
tree43c9fc82bd7fa7651f6f56b236bdb34be525b553
parent733f470f3315a258b6be99d04cc3f2cac686e7dc (diff)
db-functions: use librelib instead of having copies here
-rw-r--r--db-functions18
1 files changed, 8 insertions, 10 deletions
diff --git a/db-functions b/db-functions
index 1d4358c..75dedad 100644
--- a/db-functions
+++ b/db-functions
@@ -39,6 +39,14 @@ WORKDIR=$(mktemp -dt "${0##*/}.XXXXXXXXXX")
LOCKS=()
REPO_MODIFIED=0
+# Used: plain, msg, msg2, warning, error, in_array, get_full_version, abort, die
+# Overwritten: cleanup
+# Ignored: stat_busy, stat_done,
+# setup_workdir, trap_abort, trap_exit,
+# lock, slock, lock_close
+# pkgver_equal, find_cached_package, check_root
+. "$(librelib common)"
+
script_lock() {
local LOCKDIR="$TMPDIR/.scriptlock.${0##*/}"
if ! mkdir "$LOCKDIR" >/dev/null 2>&1 ; then
@@ -91,16 +99,6 @@ cleanup() {
[[ -n $1 ]] && exit "$1"
}
-abort() {
- msg 'Aborting...'
- cleanup 0
-}
-
-die() {
- error "$@"
- cleanup 1
-}
-
trap abort INT QUIT TERM HUP
trap cleanup EXIT