summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2008-06-26 14:17:13 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2008-06-26 14:17:13 +0000
commit2b2d1dd330de29c9e798f03fd8581cf555085afa (patch)
tree8803cbffc849b7a700237d2bf9cb06f8574ac247
parent296e9fa1cf971cdf8ee5b3ee212abf6947f182f3 (diff)
downloadalpine-conf-2b2d1dd330de29c9e798f03fd8581cf555085afa.zip
use LBU_DBDIR and fallback to APK_DATA
-rw-r--r--lbu10
1 files changed, 6 insertions, 4 deletions
diff --git a/lbu b/lbu
index 2e37086..52ca0c1 100644
--- a/lbu
+++ b/lbu
@@ -13,9 +13,10 @@ VERSION=1.2
[ "$SFIC" ] && SFIC="$SFIC -i d"
# globals
-CURRENT_TDB="$APK_DATA/current.tdb"
-TMPCURRENT_TDB="$APK_DATA/tmp-current.tdb"
-COMMITED_TDB="$APK_DATA/commited.tdb"
+[ -z "$LBU_DBDIR" ] && LBU_DBDIR="${APK_DATA:-$ROOT/var/lib/apk}"
+CURRENT_TDB="$LBU_DBDIR/current.tdb"
+TMPCURRENT_TDB="$LBU_DBDIR/tmp-current.tdb"
+COMMITED_TDB="$LBU_DBDIR/commited.tdb"
EXCLUDE_LIST=/etc/lbu/exclude
INCLUDE_LIST=/etc/lbu/include
@@ -101,8 +102,9 @@ check_openssl() {
gen_current_tdb() {
# generate current tdb
rm -f "$CURRENT_TDB"
+ mkdir -p "$(dirname \"$CURRENT_TDB\")"
$SFIC -R -t --mask "$MASK" --old "$APK_DEFAULT_TDB" $LBUDIRS \
- | grep -v ^D | awk '{print $2}' | $SFIC --add $CURRENT_TDB --file -
+ | grep -v ^D | awk '{print $2}' | $SFIC --add "$CURRENT_TDB" --file -
}
# list_add(char *listfile, char* file...)