Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 888817

Summary: sys-apps/portage: support recursive/wildcard dostrip
Product: Portage Development Reporter: matoro <matoro_bugzilla_gentoo>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: enhancement CC: ionen, matoro_bugzilla_gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description matoro archtester 2022-12-28 23:47:56 UTC
dostrip -x functions as a way to exclude individual files from stripping, but unlike the various QA_* variables it does not support directories/wildcards.  For example, many npm packages ship ridiculous prebuilt toolchains.  These can be excluded from many QA checks (though not all) by adding them to QA_PREBUILT:

QA_PREBUILT=".../node_modules/*"

But this doesn't work for the "dostrip" command.  Tried both:

dostrip -x "node_modules"

and

dostrip -x "node_modules/*"

Neither works unfortunately.  Only solution is to RESTRICT=strip the whole package.

Even worse, from what I am reading this functionality actually used to be available via STRIP_MASK, but this was removed in EAPI 7?  Please restore the ability to recursively/wildcard exclude specific directories from stripping, without disabling stripping for the whole package.

Reproducible: Always
Comment 1 Ionen Wolkens gentoo-dev 2022-12-29 00:40:10 UTC
Directories do work, but you need the full path from ${ED}

e.g. dostrip -x /usr/lib/dont-strip-anything-here
Comment 2 matoro archtester 2022-12-29 04:37:28 UTC
Okay thank you, that does work.  However it is very nonintuitive from the wording on the Install Functions reference page:

dostrip 	Introduced with EAPI=7, controls the stripping of executables. Normally executed to exclude from stripping. Eg. dostrip -x /path/to/important.so. May also be used to include binaries to strip when RESTRICT=strip without the -x option.

Compare this to the documentation for dosym:

dosym 	Create a symlink to the target specified as the first parameter, at the path specified by the second parameter. Note that the target is interpreted verbatim; it needs to either specify a relative path or an absolute path including ${EPREFIX}.

Additionally, there is no reference at all to this function in ebuild(5).

Would a PR to update the documentation be accepted?
Comment 3 Larry the Git Cow gentoo-dev 2023-04-29 15:29:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=caa3e98b1431ceeead2924302bcc997d6214ba69

commit caa3e98b1431ceeead2924302bcc997d6214ba69
Author:     matoro <matoro@users.noreply.github.com>
AuthorDate: 2023-04-27 19:07:06 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-04-29 15:26:18 +0000

    function-reference/install-functions: add note about paths to dostrip
    
    Found this extremely unintuitive especially compared to the
    documentation on the `dosym` function which is much clearer.
    
    Closes: https://bugs.gentoo.org/888817
    Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 function-reference/install-functions/text.xml | 1 +
 1 file changed, 1 insertion(+)