Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888817 - sys-apps/portage: support recursive/wildcard dostrip
Summary: sys-apps/portage: support recursive/wildcard dostrip
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-28 23:47 UTC by matoro
Modified: 2022-12-29 04:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?