summaryrefslogtreecommitdiffstats
path: root/lib/db.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db.sh')
-rw-r--r--lib/db.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/db.sh b/lib/db.sh
index 6dc15fa..e2f8fb7 100644
--- a/lib/db.sh
+++ b/lib/db.sh
@@ -33,7 +33,7 @@ db_get_srcver()
local source="${3}"
local dir=
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
if [ -f "${dir}/srcver" ]; then
cat "${dir}/srcver"
@@ -50,7 +50,7 @@ db_set_srcver()
local srcver="${4}"
local dir=
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
mkdir -p "${dir}"
printf '%s\n' "${srcver}" >"${dir}/srcver"
@@ -65,7 +65,7 @@ db_del_srcver()
local source="${3}"
local dir=
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
rm -f "${dir}/srcver"
# Remove ".../.db/<hash>/<source>".
@@ -87,7 +87,7 @@ db_get_binver()
local source="${5}"
local dir=
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}"
if [ -f "${dir}/binver" ]; then
cat "${dir}/binver"
@@ -106,7 +106,7 @@ db_set_binver()
local binver="${6}"
local dir=
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}"
mkdir -p "${dir}"
printf '%s\n' "${binver}" >"${dir}/binver"
@@ -123,7 +123,7 @@ db_del_binver()
local source="${5}"
local dir=
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}"
rm -f "${dir}/binver"
# Remove ".../.db/<hash>/<source>/<arch>_<plat>".
@@ -141,7 +141,7 @@ db_foreach_source()
shift 3
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
# For each hash:
for dir in "${dir}/"*/; do
if [ ! -d "${dir}" ]; then
@@ -168,7 +168,7 @@ db_get_archplats()
local source="${3}"
local dir=
- dir="${opt_base_dir}/feeds/${chan}/${dist}/.db"
+ dir="${base_dir}/feeds/${chan}/${dist}/.db"
dir="${dir}/$(hash_name "${source}")/${source}"
for dir in "${dir}/"*_*/; do
if [ ! -d "${dir}" ]; then
@@ -194,7 +194,7 @@ db_get_packages()
local binver="${4}"
local dir=
- dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
if [ -f "${dir}/packages" ]; then
cat "${dir}/packages"
@@ -214,7 +214,7 @@ db_add_package()
local pkg="${7}"
local dir=
- dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
mkdir -p "${dir}"
printf '%s %s %s\n' "${size}" "${sect}" "${pkg}" >>"${dir}/packages"
@@ -230,7 +230,7 @@ db_del_packages()
local binver="${4}"
local dir=
- dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${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>".
@@ -250,7 +250,7 @@ db_inc_references()
local dir=
local refs=
- dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
if [ -f "${dir}/references" ]; then
refs="$(cat "${dir}/references")"
@@ -274,7 +274,7 @@ db_dec_references()
local dir=
local refs=
- dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
+ dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
if [ -f "${dir}/references" ]; then
refs="$(cat "${dir}/references")"