• [gentoo-dev] [PATCH 2/2] sysroot.eclass: Add sysroot_run_prefixed conve

    From James Le Cuirot@21:1/5 to All on Tue Jul 1 14:50:01 2025
    This is for simple cases where you just need to run a command
    immediately rather than pass a wrapper to a build tool.

    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    ---
    eclass/sysroot.eclass | 13 +++++++++++++
    1 file changed, 13 insertions(+)

    diff --git a/eclass/sysroot.eclass b/eclass/sysroot.eclass
    index 6d1b88232eeb..f17d6bcec2b4 100644
    --- a/eclass/sysroot.eclass
    +++ b/eclass/sysroot.eclass
    @@ -106,3 +106,16 @@ sysroot_make_run_prefixed() {

    echo "${SCRIPT}"
    }
    +
    +# @FUNCTION: sysroot_run_prefixed
    +# @DESCRIPTION:
    +# Create a wrapper script with sysroot_make_run_prefixed if necessary, and use +# it to execute the given command, otherwise just execute the command directly.
    +sysroot_run_prefixed() {
    + local script
    + if script=$(sysroot_make_run_prefixed); then
    + "${script}" "${@}"
    + else
    + "${@}"
    + fi
    +}
    --
    2.49.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)