aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/unpackaged/unpackaged_id.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/unpackaged/unpackaged_id.cc')
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 1fdea2a98..118ece886 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -344,16 +344,19 @@ UnpackagedID::perform_action(Action & action) const
if (! install_action)
throw ActionFailedError("Unsupported action: " + action.simple_name());
- if (! (*install_action->options.destination()).destination_interface())
+ const auto destination = install_action->options.destination();
+
+ if (! destination->destination_interface())
throw ActionFailedError("Can't install '" + stringify(*this)
- + "' to destination '" + stringify(install_action->options.destination()->name())
+ + "' to destination '" + stringify(destination->name())
+ "' because destination does not provide destination_interface");
std::shared_ptr<OutputManager> output_manager(install_action->options.make_output_manager()(*install_action));
std::string libdir("lib");
- FSPath root(install_action->options.destination()->installed_root_key() ?
- stringify(install_action->options.destination()->installed_root_key()->parse_value()) : "/");
+ FSPath root(destination->installed_root_key()
+ ? stringify(destination->installed_root_key()->parse_value())
+ : "/");
if ((root / "usr" / "lib").stat().is_symlink())
{
libdir = (root / "usr" / "lib").readlink();
@@ -428,7 +431,7 @@ UnpackagedID::perform_action(Action & action) const
case wp_yes:
{
merge_params.check() = true;
- (*install_action->options.destination()).destination_interface()->merge(merge_params);
+ destination->destination_interface()->merge(merge_params);
}
break;
@@ -447,7 +450,7 @@ UnpackagedID::perform_action(Action & action) const
case wp_yes:
{
merge_params.check() = false;
- (*install_action->options.destination()).destination_interface()->merge(merge_params);
+ destination->destination_interface()->merge(merge_params);
}
break;