summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>2004-04-28 19:13:32 +0000
committerjoey <joey>2004-04-28 19:13:32 +0000
commit495e739006e509f7183b27d160dc6aa81e4f3db5 (patch)
treeb26a2b2fce9f62a0c04eca9e75b222a5830fe829
parent00cd4f4f47ad4b4673518c3da2d967efa8ceb521 (diff)
downloaddebhelper-495e739006e509f7183b27d160dc6aa81e4f3db5.tar.gz
r1685: * dh_strip: if an .a file is not a binary file, do not try to strip it.4.2.10
This deals with linker scripts used on the Hurd. Closes: #246366
-rwxr-xr-xdh_strip11
1 files changed, 8 insertions, 3 deletions
diff --git a/dh_strip b/dh_strip
index f7dc1f69..65c4f9f8 100755
--- a/dh_strip
+++ b/dh_strip
@@ -107,7 +107,7 @@ sub get_file_type {
my (@shared_libs, @executables, @static_libs);
sub testfile {
return if -l $_ or -d $_; # Skip directories and symlinks always.
-
+
# See if we were asked to exclude this file.
# Note that we have to test on the full filename, including directory.
my $fn="$File::Find::dir/$_";
@@ -141,8 +141,13 @@ sub testfile {
# Is it a static library, and not a debug library?
if (m/lib.*\.a$/ && ! m/.*_g\.a$/) {
- push @static_libs, $fn;
- return;
+ # Is it a binary file, or something else (maybe a liner
+ # script on Hurd, for example? I don't use file, because
+ # file returns a varity of things on static libraries.
+ if (-B $_) {
+ push @static_libs, $fn;
+ return;
+ }
}
}