[debhelper-devel] Bug#820446: Bug#820446: dh_strip: only match lib*.a static libraries

Niels Thykier niels at thykier.net
Fri Apr 8 15:07:26 UTC 2016


Peter Pentchev:
> Package: debhelper
> Version: 9.20160403
> Severity: normal
> Tags: patch
> 
> Hi,
> 
> Thanks for maintaining debhelper!
> 
> What do you think about the attached patch that makes dh_strip only
> match static libraries with "lib" at the start of the filename, not
> just anywhere in there?  It makes dh_strip's behavior consistent when
> a Debian package ships *.a files with weird names, like e.g. gforth's
> /usr/lib/*/gforth/0.7.2/cstr.a and /usr/lib/*/gforth/0.7.2./fflib.a -
> the first one is not stripped, but the second one is :) [1]
> 
> On an unrelated note, the second patch is a bit of clean-up for regular
> expressions that start with /.*/ and are not anchored (don't start with
> /^.*/) - this is pretty much a no-op and, in the worst case, may make
> the Perl virtual machine handle the regexp a bit inefficiently.  Well,
> I do believe that the regexp compiler is smart enough to drop the ".*"
> at the start anyway, but there's no need to make it do even that much :)
> 
> Thanks again for taking care of debhelper, and keep up the great work!
> 
> G'luck,
> Peter
> 
> [...]
> 

Hi Peter,

Thanks for the patches.

 * Patch 0001: looks good and I am happy to merge it as it.
 * Patch 0002: I guess the ".*" at the end could go as well?
   - Special-case the "$dh{VERSION} =~ m/-/" is more efficiently
     implemented as "index($dh{VERSION}, '-') > -1".

Thanks,
~Niels



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20160408/ee949c07/attachment-0002.sig>


More information about the debhelper-devel mailing list