From 4d7467f8db2e03f4a8962647855995f76986bb4c Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 27 Jul 2013 15:35:13 -0400 Subject: lib/db.sh: s/archive/opt_base_dir/. --- 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//". @@ -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///_". @@ -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///.db/__". @@ -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)) -- cgit v0.9.1