summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/db.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/db.sh b/lib/db.sh
index caeb0da..eb67a9a 100644
--- a/lib/db.sh
+++ b/lib/db.sh
@@ -30,7 +30,7 @@ db_get_srcver()
local source="${3}"
local dir=
- dir="${archive}/feeds/${chan}/${dist}/.db"
+ dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
if [ -f "${dir}/srcver" ]; then
cat "${dir}/srcver"
@@ -47,7 +47,7 @@ db_set_srcver()
local srcver="${4}"
local dir=
- dir="${archive}/feeds/${chan}/${dist}/.db"
+ dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
mkdir -p "${dir}"
printf '%s\n' "${srcver}" >"${dir}/srcver"
@@ -62,7 +62,7 @@ db_del_srcver()
local source="${3}"
local dir=
- dir="${archive}/feeds/${chan}/${dist}/.db"
+ dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
rm -f "${dir}/srcver"
# Remove ".../.db/<hash>/<source>".
@@ -84,7 +84,7 @@ db_get_binver()
local source="${5}"
local dir=
- dir="${archive}/feeds/${chan}/${dist}/.db"
+ dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}"
if [ -f "${dir}/binver" ]; then
cat "${dir}/binver"
@@ -103,7 +103,7 @@ db_set_binver()
local binver="${6}"
local dir=
- dir="${archive}/feeds/${chan}/${dist}/.db"
+ dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}"
mkdir -p "${dir}"
printf '%s\n' "${binver}" >"${dir}/binver"
@@ -120,7 +120,7 @@ db_del_binver()
local source="${5}"
local dir=
- dir="${archive}/feeds/${chan}/${dist}/.db"
+ dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}"
rm -f "${dir}/binver"
# Remove ".../.db/<hash>/<source>/<plat>_<arch>".
@@ -136,7 +136,7 @@ db_get_archplats()
local source="${3}"
local dir=
- dir="${archive}/feeds/${chan}/${dist}/.db"
+ dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
for dir in "${dir}/"*_*/; do
dir="${dir%/}"
@@ -159,7 +159,7 @@ db_get_packages()
local binver="${4}"
local dir=
- dir="${archive}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
if [ -f "${dir}/packages" ]; then
cat "${dir}/packages"
@@ -178,7 +178,7 @@ db_add_package()
local pkg="${6}"
local dir=
- dir="${archive}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
printf '%s %s\n' "${sect}" "${pkg}" >>"${dir}/packages"
@@ -193,7 +193,7 @@ db_del_packages()
local binver="${4}"
local dir=
- dir="${archive}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
rm -f "${dir}/packages"
# Remove "pool/<hash>/<source>/.db/<binver>_<arch>_<plat>".
@@ -213,7 +213,7 @@ db_inc_references()
local dir=
local refs=
- dir="${archive}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
refs="$(cat "${dir}/references")"
refs=$(($refs + 1))
@@ -232,7 +232,7 @@ db_dec_references()
local dir=
local refs=
- dir="${archive}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
refs="$(cat "${dir}/references")"
refs=$(($refs - 1))