aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-26 17:12:45 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-26 17:12:45 +0000
commit7917ca1808b6e64bc1be4efc7af63ecbbe93972c (patch)
tree24bbcc16cff3752edc0c45ab6a869e1fa9410dc6
parent6f01cb0ed7a775c331bc60d5b15af02fff75f135 (diff)
downloadpaludis-7917ca1808b6e64bc1be4efc7af63ecbbe93972c.tar.gz
paludis-7917ca1808b6e64bc1be4efc7af63ecbbe93972c.tar.xz
Add Layout::licensesdirs.
-rw-r--r--paludis/repositories/e/exheres_layout.cc15
-rw-r--r--paludis/repositories/e/exheres_layout.hh3
-rw-r--r--paludis/repositories/e/layout.hh3
-rw-r--r--paludis/repositories/e/traditional_layout.cc15
-rw-r--r--paludis/repositories/e/traditional_layout.hh3
5 files changed, 39 insertions, 0 deletions
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 117f358..a7e2ecb 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -516,6 +516,21 @@ ExheresLayout::exlibsdirs_package(const QualifiedPackageName & q) const
return result;
}
+tr1::shared_ptr<const FSEntrySequence>
+ExheresLayout::licenses_dirs() const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
+ if (_imp->repository->params().master_repository)
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->licenses_dirs());
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
+ result->push_back(_imp->tree_root / "licenses");
+
+ return result;
+}
+
namespace
{
void aux_files_helper(const FSEntry & d,
diff --git a/paludis/repositories/e/exheres_layout.hh b/paludis/repositories/e/exheres_layout.hh
index fca1f13..0fad604 100644
--- a/paludis/repositories/e/exheres_layout.hh
+++ b/paludis/repositories/e/exheres_layout.hh
@@ -127,6 +127,9 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_package(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual tr1::shared_ptr<const FSEntrySequence> licenses_dirs() 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 f91929a..83d7827 100644
--- a/paludis/repositories/e/layout.hh
+++ b/paludis/repositories/e/layout.hh
@@ -148,6 +148,9 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_package(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+ virtual tr1::shared_ptr<const FSEntrySequence> licenses_dirs() 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 8038b8a..6215d4e 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -533,6 +533,21 @@ TraditionalLayout::exlibsdirs_package(const QualifiedPackageName & q) const
return result;
}
+tr1::shared_ptr<const FSEntrySequence>
+TraditionalLayout::licenses_dirs() const
+{
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+
+ if (_imp->repository->params().master_repository)
+ {
+ tr1::shared_ptr<const FSEntrySequence> master(_imp->repository->params().master_repository->layout()->licenses_dirs());
+ std::copy(master->begin(), master->end(), result->back_inserter());
+ }
+ result->push_back(_imp->tree_root / "licenses");
+
+ return result;
+}
+
namespace
{
void aux_files_helper(const FSEntry & d,
diff --git a/paludis/repositories/e/traditional_layout.hh b/paludis/repositories/e/traditional_layout.hh
index dbc5fd2..41060a6 100644
--- a/paludis/repositories/e/traditional_layout.hh
+++ b/paludis/repositories/e/traditional_layout.hh
@@ -129,6 +129,9 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs_package(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual tr1::shared_ptr<const FSEntrySequence> licenses_dirs() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
virtual tr1::shared_ptr<Map<FSEntry, std::string> > manifest_files(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));