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
Directories do work, but you need the full path from ${ED} e.g. dostrip -x /usr/lib/dont-strip-anything-here
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?
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(+)