aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/e_repository.cc2
-rw-r--r--paludis/repositories/e/exndbam_repository.cc2
-rw-r--r--paludis/repositories/e/pbin_merger.cc1
-rw-r--r--paludis/repositories/e/pbin_merger.hh2
-rw-r--r--paludis/repositories/e/vdb_merger.cc1
-rw-r--r--paludis/repositories/e/vdb_merger.hh2
-rw-r--r--paludis/repositories/e/vdb_merger_TEST.cc4
-rw-r--r--paludis/repositories/e/vdb_repository.cc2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc9
9 files changed, 23 insertions, 2 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 9209619dc..b9d9ab435 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -82,6 +82,7 @@
#include <paludis/util/options.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/process.hh>
+#include <paludis/util/return_literal_function.hh>
#include <paludis/util/rmd160.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
@@ -1727,6 +1728,7 @@ ERepository::merge(const MergeParams & m)
n::options() = m.options(),
n::output_manager() = m.output_manager(),
n::package_id() = m.package_id(),
+ n::permit_destination() = std::bind(return_literal_function(true)),
n::root() = FSPath("/"),
n::tar_file() = _imp->params.binary_distdir() / (bin_dist_base + pbin_tar_extension)
));
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index f3018394d..71a9624ac 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -39,6 +39,7 @@
#include <paludis/util/fs_stat.hh>
#include <paludis/util/fs_iterator.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/return_literal_function.hh>
#include <paludis/output_manager.hh>
#include <paludis/distribution.hh>
@@ -430,6 +431,7 @@ ExndbamRepository::merge(const MergeParams & m)
n::options() = m.options(),
n::output_manager() = m.output_manager(),
n::package_id() = m.package_id(),
+ n::permit_destination() = std::bind(return_literal_function(true)),
n::root() = installed_root_key()->parse_value()
));
diff --git a/paludis/repositories/e/pbin_merger.cc b/paludis/repositories/e/pbin_merger.cc
index 24052d12e..98c2919c7 100644
--- a/paludis/repositories/e/pbin_merger.cc
+++ b/paludis/repositories/e/pbin_merger.cc
@@ -76,6 +76,7 @@ PbinMerger::PbinMerger(const PbinMergerParams & p) :
n::merged_entries() = p.merged_entries(),
n::no_chown() = ! getenv_with_default(env_vars::no_chown, "").empty(),
n::options() = p.options(),
+ n::permit_destination() = p.permit_destination(),
n::root() = p.root(),
n::tar_file() = p.tar_file()
)),
diff --git a/paludis/repositories/e/pbin_merger.hh b/paludis/repositories/e/pbin_merger.hh
index 09c958e8a..dbc29c5cd 100644
--- a/paludis/repositories/e/pbin_merger.hh
+++ b/paludis/repositories/e/pbin_merger.hh
@@ -39,6 +39,7 @@ namespace paludis
typedef Name<struct name_options> options;
typedef Name<struct name_output_manager> output_manager;
typedef Name<struct name_package_id> package_id;
+ typedef Name<struct name_permit_destination> permit_destination;
typedef Name<struct name_root> root;
typedef Name<struct name_tar_file> tar_file;
}
@@ -56,6 +57,7 @@ namespace paludis
NamedValue<n::options, MergerOptions> options;
NamedValue<n::output_manager, std::shared_ptr<OutputManager> > output_manager;
NamedValue<n::package_id, std::shared_ptr<const PackageID> > package_id;
+ NamedValue<n::permit_destination, PermitDestinationFn> permit_destination;
NamedValue<n::root, FSPath> root;
NamedValue<n::tar_file, FSPath> tar_file;
};
diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc
index ebe05681a..8c6b23caf 100644
--- a/paludis/repositories/e/vdb_merger.cc
+++ b/paludis/repositories/e/vdb_merger.cc
@@ -96,6 +96,7 @@ VDBMerger::VDBMerger(const VDBMergerParams & p) :
n::merged_entries() = p.merged_entries(),
n::no_chown() = ! getenv_with_default(env_vars::no_chown, "").empty(),
n::options() = p.options(),
+ n::permit_destination() = p.permit_destination(),
n::root() = p.root()
)),
_imp(p)
diff --git a/paludis/repositories/e/vdb_merger.hh b/paludis/repositories/e/vdb_merger.hh
index 457cd0f80..57374e165 100644
--- a/paludis/repositories/e/vdb_merger.hh
+++ b/paludis/repositories/e/vdb_merger.hh
@@ -40,6 +40,7 @@ namespace paludis
typedef Name<struct name_options> options;
typedef Name<struct name_output_manager> output_manager;
typedef Name<struct name_package_id> package_id;
+ typedef Name<struct name_permit_destination> permit_destination;
typedef Name<struct name_root> root;
}
@@ -64,6 +65,7 @@ namespace paludis
NamedValue<n::options, MergerOptions> options;
NamedValue<n::output_manager, std::shared_ptr<OutputManager> > output_manager;
NamedValue<n::package_id, std::shared_ptr<const PackageID> > package_id;
+ NamedValue<n::permit_destination, PermitDestinationFn> permit_destination;
NamedValue<n::root, FSPath> root;
};
diff --git a/paludis/repositories/e/vdb_merger_TEST.cc b/paludis/repositories/e/vdb_merger_TEST.cc
index 034a5b1e5..223a36fa4 100644
--- a/paludis/repositories/e/vdb_merger_TEST.cc
+++ b/paludis/repositories/e/vdb_merger_TEST.cc
@@ -29,9 +29,12 @@
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/set.hh>
#include <paludis/util/fs_stat.hh>
+#include <paludis/util/return_literal_function.hh>
#include <paludis/standard_output_manager.hh>
+#include <functional>
+
#include <gtest/gtest.h>
using namespace paludis;
@@ -109,6 +112,7 @@ namespace
n::options() = MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs,
n::output_manager() = std::make_shared<StandardOutputManager>(),
n::package_id() = std::shared_ptr<PackageID>(),
+ n::permit_destination() = std::bind(return_literal_function(true)),
n::root() = root_dir
));
}
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index b1063e7eb..373b7dd6c 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -78,6 +78,7 @@
#include <paludis/util/fs_stat.hh>
#include <paludis/util/fs_iterator.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/return_literal_function.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/create_iterator-impl.hh>
@@ -657,6 +658,7 @@ VDBRepository::merge(const MergeParams & m)
n::options() = m.options(),
n::output_manager() = m.output_manager(),
n::package_id() = m.package_id(),
+ n::permit_destination() = std::bind(return_literal_function(true)),
n::root() = installed_root_key()->parse_value()
));
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 89924a3d2..67a6c9476 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -20,8 +20,7 @@
#include <paludis/repositories/unpackaged/installed_repository.hh>
#include <paludis/repositories/unpackaged/installed_id.hh>
#include <paludis/repositories/unpackaged/exceptions.hh>
-#include <paludis/ndbam.hh>
-#include <paludis/ndbam_merger.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/stringify.hh>
@@ -36,6 +35,10 @@
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/fs_iterator.hh>
#include <paludis/util/fs_stat.hh>
+#include <paludis/util/return_literal_function.hh>
+
+#include <paludis/ndbam.hh>
+#include <paludis/ndbam_merger.hh>
#include <paludis/action.hh>
#include <paludis/environment.hh>
#include <paludis/metadata_key.hh>
@@ -48,6 +51,7 @@
#include <paludis/hook.hh>
#include <paludis/common_sets.hh>
#include <paludis/unformatted_pretty_printer.hh>
+
#include <sstream>
#include <sys/time.h>
@@ -374,6 +378,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
n::options() = m.options(),
n::output_manager() = m.output_manager(),
n::package_id() = m.package_id(),
+ n::permit_destination() = std::bind(return_literal_function(true)),
n::root() = installed_root_key()->parse_value()
));