• [gentoo-dev] [PATCH 3/4] postgres-multi.eclass: stop using which(1)

    From Sam James@21:1/5 to All on Mon Dec 5 12:00:02 2022
    It's non-portable and we're looking to remove it from @system.

    Bug: https://bugs.gentoo.org/646588
    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    eclass/postgres-multi.eclass | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
    index c73f33c71b49..9dcf22e64a12 100644
    --- a/eclass/postgres-multi.eclass
    +++ b/eclass/postgres-multi.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2021 Gentoo Authors
    +# Copyright 1999-2022 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    inherit multibuild postgres
    @@ -58,7 +58,7 @@ export _POSTGRES_INTERSECT_SLOTS=( )
    _postgres-multi_multibuild_wrapper() {
    debug-print-function ${FUNCNAME} "${@}"
    export PG_SLOT=${MULTIBUILD_VARIANT}
    - export PG_CONFIG=$(which pg_config${MULTIBUILD_VARIANT//./})
    + export PG_CONFIG=$(type -P pg_config${MULTIBUILD_VARIANT//./})
    if [[ -n ${PKG_CONFIG_PATH} ]] ; then
    PKG_CONFIG_PATH="$(${PG_CONFIG} --libdir)/pkgconfig:${PKG_CONFIG_PATH}"
    else
    @@ -139,7 +139,7 @@ postgres-multi_src_prepare() {
    # Portage, but won't be caught by /usr/bin/ebuild)