summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-06 05:44:03 +0000
committerSam James <sam@gentoo.org>2022-12-06 05:44:03 +0000
commitda744421aa59fbf4e05b92702dae88dcb7af33d4 (patch)
treec298802deb723cf77fe57a7f69bce68408cababa /eclass/postgres-multi.eclass
parentusr-ldscript.eclass: stop using which(1) (diff)
downloadgentoo-da744421aa59fbf4e05b92702dae88dcb7af33d4.tar.gz
gentoo-da744421aa59fbf4e05b92702dae88dcb7af33d4.tar.bz2
gentoo-da744421aa59fbf4e05b92702dae88dcb7af33d4.zip
postgres-multi.eclass: stop using which(1)
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>
Diffstat (limited to 'eclass/postgres-multi.eclass')
-rw-r--r--eclass/postgres-multi.eclass6
1 files 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)
local slot
for slot in ${_POSTGRES_INTERSECT_SLOTS[@]} ; do
- if [[ -z $(which pg_config${slot/.} 2> /dev/null) ]] ; then
+ if [[ -z $(type -P pg_config${slot/.} 2> /dev/null) ]] ; then
eerror
eerror "postgres_targets_postgres${slot/.} use flag is enabled, but hasn't been emerged."
eerror