From b642f661af8b1c7f35d6f6b36a28af173fc7c51f Mon Sep 17 00:00:00 2001 From: "Aaron W. Swenson" Date: Tue, 6 Jul 2021 20:38:38 -0400 Subject: dev-db/postgresql: Fix environment reset in pkg_config Without resetting the environment the config phase results in the following non-fatal error message being produced: could not change directory to "/var/tmp/portage/dev-db/postgresql-13.1/homedir": Permission denied Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Martin Kletzander Closes: https://bugs.gentoo.org/796344 Closes: https://github.com/gentoo/gentoo/pull/18332 Signed-off-by: Aaron W. Swenson --- dev-db/postgresql/postgresql-12.7.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dev-db/postgresql/postgresql-12.7.ebuild') diff --git a/dev-db/postgresql/postgresql-12.7.ebuild b/dev-db/postgresql/postgresql-12.7.ebuild index c6cea755c817..82e066d4d05b 100644 --- a/dev-db/postgresql/postgresql-12.7.ebuild +++ b/dev-db/postgresql/postgresql-12.7.ebuild @@ -388,7 +388,7 @@ pkg_config() { einfo "Initializing the database ..." if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" else "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} fi -- cgit v1.2.3