aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Maximilian Grothusmann <maxi@own-hero.net> 2008-12-05 18:21:00 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-05 18:48:10 +0000
commit934b88bc8a2841258adc6d425b7a94f5f7503824 (patch)
tree44519ffd549c1770497a178f14405f5c6267a8a3
parent9c4b5b39a828509e752cb7d2888ff6e49d7694a6 (diff)
downloadpaludis-934b88bc8a2841258adc6d425b7a94f5f7503824.tar.gz
paludis-934b88bc8a2841258adc6d425b7a94f5f7503824.tar.xz
Unbreak the stripper.
7cd0c2d122a5b38c5a925dac52b429c99e7f5085 (Paludis is about choices.) broke it.
-rw-r--r--paludis/stripper.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/paludis/stripper.cc b/paludis/stripper.cc
index 397e036..60e694e 100644
--- a/paludis/stripper.cc
+++ b/paludis/stripper.cc
@@ -103,9 +103,13 @@ Stripper::do_dir_recursive(const FSEntry & f)
std::string t(file_type(*d));
if (std::string::npos != t.find("SB executable") || std::string::npos != t.find("SB shared object"))
{
- FSEntry target(_imp->options.debug_dir() / d->strip_leading(_imp->options.image_dir()));
- target = target.dirname() / (target.basename() + ".debug");
- do_split(*d, target);
+ if (_imp->options.split())
+ {
+ FSEntry target(_imp->options.debug_dir() / d->strip_leading(_imp->options.image_dir()));
+ target = target.dirname() / (target.basename() + ".debug");
+ do_split(*d, target);
+ }
+ do_strip(*d, "");
}
else if (std::string::npos != t.find("current ar archive"))
{
@@ -147,13 +151,6 @@ void
Stripper::do_split(const FSEntry & f, const FSEntry & g)
{
Context context("When splitting '" + stringify(f) + "' to '" + stringify(g) + "':");
-
- if (_imp->options.strip())
- do_strip(f, "");
-
- if (! _imp->options.split())
- return;
-
on_split(f, g);
{
@@ -170,9 +167,6 @@ Stripper::do_split(const FSEntry & f, const FSEntry & g)
else if (0 != run_command(Command("objcopy --add-gnu-debuglink='" + stringify(g) + "' '" + stringify(f) + "'")))
Log::get_instance()->message("strip.failure", ll_warning, lc_context) << "Couldn't add debug link for '" << f << "'";
else
- {
FSEntry(g).chmod(g.permissions() & ~(S_IXGRP | S_IXUSR | S_IXOTH | S_IWOTH));
- do_strip(f, "");
- }
}