aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-27 19:05:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-27 19:06:34 +0000
commit41ad999cb4ceebef040395d623d23a36b805bca5 (patch)
treea56c3934b2988a98deb945a981eead8fac202fa2
parent9e8be8c45a36e9f53a586a79acb726d74f5c687b (diff)
downloadpaludis-41ad999cb4ceebef040395d623d23a36b805bca5.tar.gz
paludis-41ad999cb4ceebef040395d623d23a36b805bca5.tar.xz
Support compressed debugging for unpackaged
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc12
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc4
-rw-r--r--paludis/repositories/unpackaged/unpackaged_stripper.cc2
-rw-r--r--paludis/repositories/unpackaged/unpackaged_stripper.hh2
4 files changed, 11 insertions, 9 deletions
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 37d9b7e..2d33885 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 119d1a6..31842b6 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 899c250..fcbb7fa 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 32383b7..9f1599c 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;