aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paludis/repositories/e/exheres_layout.cc56
-rw-r--r--paludis/repositories/e/exheres_layout.hh9
-rw-r--r--paludis/repositories/e/layout.hh9
-rw-r--r--paludis/repositories/e/traditional_layout.cc56
-rw-r--r--paludis/repositories/e/traditional_layout.hh9
5 files changed, 127 insertions, 12 deletions
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index ff91257..666d3e8 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -453,15 +453,59 @@ ExheresLayout::exlibsdirs(const QualifiedPackageName & q) const
{
tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ tr1::shared_ptr<const FSEntrySequence> global(exlibsdirs_global());
+ std::copy(global->begin(), global->end(), result->back_inserter());
+
+ tr1::shared_ptr<const FSEntrySequence> category(exlibsdirs_category(q.category));
+ std::copy(category->begin(), category->end(), result->back_inserter());
+
+ tr1::shared_ptr<const FSEntrySequence> package(exlibsdirs_package(q));
+ std::copy(package->begin(), package->end(), result->back_inserter());
+
+ return result;
+}
+
+tr1::shared_ptr<const FSEntrySequence>
+ExheresLayout::exlibsdirs_global() const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
if (_imp->repository->params().master_repository)
- result->push_back(_imp->repository->params().master_repository->params().location / "exlibs");
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->exlibsdirs_global());
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
result->push_back(_imp->tree_root / "exlibs");
+
+ return result;
+}
+
+tr1::shared_ptr<const FSEntrySequence>
+ExheresLayout::exlibsdirs_category(const CategoryNamePart & c) const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
if (_imp->repository->params().master_repository)
- result->push_back(_imp->repository->params().master_repository->layout()->category_directory(q.category) / "exlibs");
- result->push_back(_imp->repository->layout()->category_directory(q.category) / "exlibs");
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->exlibsdirs_category(c));
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
+ result->push_back(category_directory(c) / "exlibs");
+
+ return result;
+}
+
+tr1::shared_ptr<const FSEntrySequence>
+ExheresLayout::exlibsdirs_package(const QualifiedPackageName & q) const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
if (_imp->repository->params().master_repository)
- result->push_back(_imp->repository->params().master_repository->layout()->package_directory(q));
- result->push_back(_imp->repository->layout()->package_directory(q));
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->exlibsdirs_package(q));
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
+ result->push_back(package_directory(q));
return result;
}
@@ -491,7 +535,7 @@ namespace
continue;
m->insert((*f), "AUX");
}
- }
+ }
}
}
diff --git a/paludis/repositories/e/exheres_layout.hh b/paludis/repositories/e/exheres_layout.hh
index e837abf..59c3071 100644
--- a/paludis/repositories/e/exheres_layout.hh
+++ b/paludis/repositories/e/exheres_layout.hh
@@ -111,6 +111,15 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs(const QualifiedPackageName &) const;
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_global() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_category(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_package(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
virtual tr1::shared_ptr<Map<FSEntry, std::string> > manifest_files(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/layout.hh b/paludis/repositories/e/layout.hh
index 75f2825..f6d8fb2 100644
--- a/paludis/repositories/e/layout.hh
+++ b/paludis/repositories/e/layout.hh
@@ -132,6 +132,15 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_global() const
+ PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_category(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_package(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+
virtual tr1::shared_ptr<Map<FSEntry, std::string> > manifest_files(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 31beab8..986b2fe 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -470,15 +470,59 @@ TraditionalLayout::exlibsdirs(const QualifiedPackageName & q) const
{
tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ tr1::shared_ptr<const FSEntrySequence> global(exlibsdirs_global());
+ std::copy(global->begin(), global->end(), result->back_inserter());
+
+ tr1::shared_ptr<const FSEntrySequence> category(exlibsdirs_category(q.category));
+ std::copy(category->begin(), category->end(), result->back_inserter());
+
+ tr1::shared_ptr<const FSEntrySequence> package(exlibsdirs_package(q));
+ std::copy(package->begin(), package->end(), result->back_inserter());
+
+ return result;
+}
+
+tr1::shared_ptr<const FSEntrySequence>
+TraditionalLayout::exlibsdirs_global() const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
if (_imp->repository->params().master_repository)
- result->push_back(_imp->repository->params().master_repository->params().location / "exlibs");
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->exlibsdirs_global());
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
result->push_back(_imp->tree_root / "exlibs");
+
+ return result;
+}
+
+tr1::shared_ptr<const FSEntrySequence>
+TraditionalLayout::exlibsdirs_category(const CategoryNamePart & c) const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
if (_imp->repository->params().master_repository)
- result->push_back(_imp->repository->params().master_repository->layout()->category_directory(q.category) / "exlibs");
- result->push_back(_imp->repository->layout()->category_directory(q.category) / "exlibs");
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->exlibsdirs_category(c));
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
+ result->push_back(category_directory(c) / "exlibs");
+
+ return result;
+}
+
+tr1::shared_ptr<const FSEntrySequence>
+TraditionalLayout::exlibsdirs_package(const QualifiedPackageName & q) const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
if (_imp->repository->params().master_repository)
- result->push_back(_imp->repository->params().master_repository->layout()->package_directory(q));
- result->push_back(_imp->repository->layout()->package_directory(q));
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->exlibsdirs_package(q));
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
+ result->push_back(package_directory(q));
return result;
}
@@ -508,7 +552,7 @@ namespace
continue;
m->insert((*f), "AUX");
}
- }
+ }
}
}
diff --git a/paludis/repositories/e/traditional_layout.hh b/paludis/repositories/e/traditional_layout.hh
index adac744..c40993a 100644
--- a/paludis/repositories/e/traditional_layout.hh
+++ b/paludis/repositories/e/traditional_layout.hh
@@ -113,6 +113,15 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_global() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_category(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_package(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
virtual tr1::shared_ptr<Map<FSEntry, std::string> > manifest_files(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));