summaryrefslogtreecommitdiff
path: root/dev-db/postgresql/postgresql-13.3.ebuild
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2021-07-06 20:38:38 -0400
committerAaron W. Swenson <titanofold@gentoo.org>2021-07-06 20:38:38 -0400
commitb642f661af8b1c7f35d6f6b36a28af173fc7c51f (patch)
treec84752bfa7264f964cc1d9d83132af08a825a77e /dev-db/postgresql/postgresql-13.3.ebuild
parentb4db85841e208da392bfc857805f0f5b4cb4640e (diff)
downloadgentoo-b642f661af8b1c7f35d6f6b36a28af173fc7c51f.tar.gz
gentoo-b642f661af8b1c7f35d6f6b36a28af173fc7c51f.tar.bz2
gentoo-b642f661af8b1c7f35d6f6b36a28af173fc7c51f.zip
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 <nert.pinx@gmail.com> Closes: https://bugs.gentoo.org/796344 Closes: https://github.com/gentoo/gentoo/pull/18332 Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>
Diffstat (limited to 'dev-db/postgresql/postgresql-13.3.ebuild')
-rw-r--r--dev-db/postgresql/postgresql-13.3.ebuild2
1 files changed, 1 insertions, 1 deletions
diff --git a/dev-db/postgresql/postgresql-13.3.ebuild b/dev-db/postgresql/postgresql-13.3.ebuild
index 9b8485c9bc0f..d71750a1cb74 100644
--- a/dev-db/postgresql/postgresql-13.3.ebuild
+++ b/dev-db/postgresql/postgresql-13.3.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