diff options
4 files changed, 11 insertions, 9 deletions
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc index 37d9b7e07..2d3388518 100644 --- a/paludis/repositories/unpackaged/unpackaged_id.cc +++ b/paludis/repositories/unpackaged/unpackaged_id.cc @@ -397,10 +397,8 @@ UnpackagedID::perform_action(Action & action) const Log::get_instance()->message("unpackaged.libdir", ll_debug, lc_context) << "Using '" << libdir << "' for libdir"; - std::shared_ptr<const ChoiceValue> strip_choice(choices_key()->value()->find_by_name_with_prefix( - ELikeStripChoiceValue::canonical_name_with_prefix())); - std::shared_ptr<const ChoiceValue> split_choice(choices_key()->value()->find_by_name_with_prefix( - ELikeSplitChoiceValue::canonical_name_with_prefix())); + std::shared_ptr<const ChoiceValue> symbols_choice(choices_key()->value()->find_by_name_with_prefix( + ELikeSymbolsChoiceValue::canonical_name_with_prefix())); std::shared_ptr<const ChoiceValue> preserve_work_choice(choices_key()->value()->find_by_name_with_prefix( ELikePreserveWorkChoiceValue::canonical_name_with_prefix())); @@ -411,12 +409,14 @@ UnpackagedID::perform_action(Action & action) const case wp_yes: { UnpackagedStripper stripper(make_named_values<UnpackagedStripperOptions>( + n::compress_splits() = symbols_choice && symbols_choice->enabled() && ELikeSymbolsChoiceValue::should_compress( + symbols_choice->parameter()), n::debug_dir() = fs_location_key()->value() / "usr" / libdir / "debug", n::image_dir() = fs_location_key()->value(), n::output_manager() = output_manager, n::package_id() = shared_from_this(), - n::split() = split_choice && split_choice->enabled(), - n::strip() = strip_choice && strip_choice->enabled() + n::split() = symbols_choice && symbols_choice->enabled() && ELikeSymbolsChoiceValue::should_split(symbols_choice->parameter()), + n::strip() = symbols_choice && symbols_choice->enabled() && ELikeSymbolsChoiceValue::should_strip(symbols_choice->parameter()) )); stripper.strip(); diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc index 119d1a61b..31842b65f 100644 --- a/paludis/repositories/unpackaged/unpackaged_key.cc +++ b/paludis/repositories/unpackaged/unpackaged_key.cc @@ -168,8 +168,8 @@ UnpackagedChoicesKey::value() const if (_imp->id->strip_key()) strip = _imp->id->strip_key()->value(); - build_options->add(std::make_shared<ELikeSplitChoiceValue>(_imp->id->shared_from_this(), _imp->env, build_options, strip)); - build_options->add(std::make_shared<ELikeStripChoiceValue>(_imp->id->shared_from_this(), _imp->env, build_options, strip)); + build_options->add(std::make_shared<ELikeSymbolsChoiceValue>(_imp->id->shared_from_this(), _imp->env, build_options, + strip.is_true() ? escvp_strip : strip.is_false() ? escvp_preserve : last_escvp)); Tribool preserve_work(indeterminate); if (_imp->id->preserve_work_key()) diff --git a/paludis/repositories/unpackaged/unpackaged_stripper.cc b/paludis/repositories/unpackaged/unpackaged_stripper.cc index 899c25058..fcbb7fad5 100644 --- a/paludis/repositories/unpackaged/unpackaged_stripper.cc +++ b/paludis/repositories/unpackaged/unpackaged_stripper.cc @@ -42,7 +42,7 @@ namespace paludis UnpackagedStripper::UnpackagedStripper(const UnpackagedStripperOptions & options) : Stripper(make_named_values<StripperOptions>( - n::compress_splits() = false, + n::compress_splits() = options.compress_splits(), n::debug_dir() = options.debug_dir(), n::image_dir() = options.image_dir(), n::split() = options.split(), diff --git a/paludis/repositories/unpackaged/unpackaged_stripper.hh b/paludis/repositories/unpackaged/unpackaged_stripper.hh index 32383b70e..9f1599cbe 100644 --- a/paludis/repositories/unpackaged/unpackaged_stripper.hh +++ b/paludis/repositories/unpackaged/unpackaged_stripper.hh @@ -29,6 +29,7 @@ namespace paludis { namespace n { + typedef Name<struct name_compress_splits> compress_splits; typedef Name<struct name_debug_dir> debug_dir; typedef Name<struct name_image_dir> image_dir; typedef Name<struct name_output_manager> output_manager; @@ -41,6 +42,7 @@ namespace paludis { struct UnpackagedStripperOptions { + NamedValue<n::compress_splits, bool> compress_splits; NamedValue<n::debug_dir, FSPath> debug_dir; NamedValue<n::image_dir, FSPath> image_dir; NamedValue<n::output_manager, std::shared_ptr<OutputManager> > output_manager; |