aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-31 06:39:48 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-31 06:39:48 +0000
commit1c0b8304317df2583ef2e01a336dbbb576e3dd18 (patch)
tree7330ae515f7a3868bd213d666f0de83a68a410ca
parentd3c823516272f99d3588dedcc6d3c6f09fbb14b3 (diff)
downloadpaludis-1c0b8304317df2583ef2e01a336dbbb576e3dd18.tar.gz
paludis-1c0b8304317df2583ef2e01a336dbbb576e3dd18.tar.xz
Remove hard references to vdb directory
-rw-r--r--ebuild/builtin_merge.bash4
-rw-r--r--ebuild/builtin_unmerge.bash2
-rwxr-xr-xhooks/gnu_info_index.bash7
3 files changed, 7 insertions, 6 deletions
diff --git a/ebuild/builtin_merge.bash b/ebuild/builtin_merge.bash
index 6859cb7..9ebdc31 100644
--- a/ebuild/builtin_merge.bash
+++ b/ebuild/builtin_merge.bash
@@ -25,10 +25,10 @@ builtin_merge()
local olddotglob=$?
shopt -s dotglob
- local dbdir="${ROOT%/}"/var/db/pkg/"${CATEGORY}/${PF}"
+ local dbdir="$(vdb_path )/${CATEGORY}/${PF}"
ebuild_section "Writing VDB entry to '${dbdir}'..."
install -d "${dbdir}" || die "couldn't make pkg db directory (\"${dbdir}\")"
- install -d "${ROOT%/}"/var/db/pkg/.cache || die "couldn't make pkg db cache"
+ install -d $(vdb_path )"/${CATEGORY}/${PF}"/.cache || die "couldn't make pkg db cache"
local v VDB_FORMAT="paludis-2"
for v in CATEGORY CBUILD CHOST DEPEND DESCRIPTION EAPI \
diff --git a/ebuild/builtin_unmerge.bash b/ebuild/builtin_unmerge.bash
index c965b33..a7aa689 100644
--- a/ebuild/builtin_unmerge.bash
+++ b/ebuild/builtin_unmerge.bash
@@ -19,7 +19,7 @@
builtin_unmerge()
{
- local dbdir="${ROOT}"/var/db/pkg/"${CATEGORY}/${PF}" entry
+ local dbdir="$(vdb_path )/${CATEGORY}/${PF}" entry
[[ -d "${dbdir}" ]] || die "couldn't find pkg db directory (\"${dbdir}\")"
for v in CATEGORY CBUILD CHOST DEPEND DESCRIPTION EAPI \
diff --git a/hooks/gnu_info_index.bash b/hooks/gnu_info_index.bash
index 64baaeb..1fa7ba6 100755
--- a/hooks/gnu_info_index.bash
+++ b/hooks/gnu_info_index.bash
@@ -24,13 +24,14 @@ echo
einfo "Checking whether the GNU info directory needs updating..."
regen_info_dirs=
+vdb_loc=$(${PALUDIS_COMMAND} --configuration-variable installed location )
for info_path in ${INFOPATH/:/ } ; do
info_path="${ROOT%/}/${info_path}"
[[ -d "${info_path}" ]] || continue
info_time=$(getmtime "${info_path}" )
- if [[ -f "${ROOT}/var/db/pkg/.cache/info_time_cache" ]] ; then
- info_time_cache=$(getmtime "${ROOT}"/var/db/pkg/.cache/info_time_cache )
+ if [[ -f "${vdb_loc}/.cache/info_time_cache" ]] ; then
+ info_time_cache=$(getmtime "${vdb_loc}"/.cache/info_time_cache )
[[ "${info_time}" -le "${info_time_cache}" ]] && continue
fi
@@ -71,7 +72,7 @@ for info_path in ${regen_info_dirs} ; do
done
done
-touch "${ROOT}/var/db/pkg/.cache/info_time_cache"
+touch "${vdb_loc}/.cache/info_time_cache"
if [[ ${bad_count} -gt 0 ]] ; then
ewarn "Processed $(( good_count + bad_count )) info files, with ${bad_count} errors"