aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-11 00:07:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-11 00:07:12 +0000
commitf6d1a03fe17976d2fdcf95c7a3197f6852fa897a (patch)
tree9204a4f6511114c2797072140e8490dc9c107b78
parentc4af240b22a3d39551e7d61e1ca709ef5b01d99e (diff)
downloadpaludis-f6d1a03fe17976d2fdcf95c7a3197f6852fa897a.tar.gz
paludis-f6d1a03fe17976d2fdcf95c7a3197f6852fa897a.tar.xz
Don't expect a cache directory for PortageRepository instances if the default cache directory doesn't exist
-rw-r--r--paludis/repositories/portage/make_ebuild_repository.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/paludis/repositories/portage/make_ebuild_repository.cc b/paludis/repositories/portage/make_ebuild_repository.cc
index 426e0c2..6b0dd5a 100644
--- a/paludis/repositories/portage/make_ebuild_repository.cc
+++ b/paludis/repositories/portage/make_ebuild_repository.cc
@@ -92,7 +92,11 @@ paludis::make_ebuild_repository(
std::string cache;
if (m->end() == m->find("cache") || ((cache = m->find("cache")->second)).empty())
+ {
cache = location + "/metadata/cache";
+ if (! FSEntry(cache).exists())
+ cache = "/var/empty";
+ }
std::string sync;
if (m->end() == m->find("sync") || ((sync = m->find("sync")->second)).empty())