summaryrefslogtreecommitdiff
path: root/dh_strip
diff options
context:
space:
mode:
authorjoey <joey>2002-09-27 23:55:35 +0000
committerjoey <joey>2002-09-27 23:55:35 +0000
commitb756b21970026a2ccf88013e85053a0145828839 (patch)
tree62b41f87a91bc3fe427ec8cbc7dfe4c81c10515c /dh_strip
parent79b845498ac4420eb6f422137e0b428ec841270e (diff)
r552: * The "reverse hangover" release.
* dh_strip: better documentation, removed extraneous "item" from SYNOPSIS. Closes: #162493 * dh_strip: detect and don't strip debug/*.so files. * Note that 4.1.11 changelog entry was incorrect, dh_perl worked fine without that change, but the new behavior is less likely to break things if dpkg-gencontrol changes. * Various improvements to debhelper(1).
Diffstat (limited to 'dh_strip')
-rwxr-xr-xdh_strip18
1 files changed, 15 insertions, 3 deletions
diff --git a/dh_strip b/dh_strip
index ac51cd5e..7e04d749 100755
--- a/dh_strip
+++ b/dh_strip
@@ -12,7 +12,7 @@ use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
-B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>] [item]
+B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>]
=head1 DESCRIPTION
@@ -20,8 +20,17 @@ dh_strip is a debhelper program that is responsible for stripping
executables, shared libraries, and static libraries that are not used for
debugging.
-It assumes that files that have names like lib*_g.a are static libraries
-used in debugging, and will not strip them.
+This program examines your package build directories and works out what
+to strip on its own. It uses L<file(1)> and file permisions and filenames
+to figure out what files are shared libraries (*.so), executable binaries,
+and static (lib*.a) and debugging libraries (lib*_g.a, debug/*.so), and
+strips each as much as is possible. (Which is not at all for debugging
+libraries.) In general it seems to make very good guesses, and will do the
+right thing in almost all cases.
+
+Since it is very hard to automatically guess if a file is a
+module, and hard to determine how to strip a module, dh_strip does not
+currently deal with stripping binary modules such as .o files.
=head1 OPTIONS
@@ -78,6 +87,9 @@ sub testfile {
return if ($fn=~m/\Q$f\E/);
}
+ # Is it a debug library in a debug subdir?
+ return if $fn=~m/debug\/.*\.so/;
+
# Does its filename look like a shared library?
if (m/.*\.so.*?/) {
# Ok, do the expensive test.