On Thu, Jan 17, 2002 at 04:32:15PM +0100, Stefano Zacchiroli wrote: > Hi mentors, > I have a package that install two binaries, one of them have to be > stripped while the other have not to. > The file "foo" (for example) have not to be stripped (is a bytecode > executable, so stripping will remove the bytecode and the executable > will become useless), the file "foo.opt" have to be stripped (is a > native code executable).
> If I use "dh_strip -Xfoo" obviously none of the two will be stripped
> because "foo" string is contained also in "foo.opt".
> I have tried some hacks assuming that the argument is a perl regular
> expression but with poor results (I've tried "-Xfoo\[^.opt\] and
> similar).
> How can I strip only "foo.opt" using dh_strip?
The short answer is: you can't.
In dh_strip:
foreach my $f (@{$dh{EXCLUDE}}) {
return if ($fn=~m/\Q$f\E/);
}
Bounding the filename part with \Q \E means that you can't use regexp
metacharacters in the -X option.
So, don't use dh_strip. dh_strip is a simple tool for simple
configurations; if you have one binary you need stripped, and one binary
you need left alone, and dh_strip doesn't do the trick, call strip
yourself.
strip --remove-section=.comment --remove-section=.note path/to/foo.opt
Steve Langasek
postmodern programmer
pgpmA7G3lMq6d.pgp
Description: PGP signature

