dev-db/postgresql: [QA] Fix UnnecessarySlashStrip
authorDavid Seifert <soap@gentoo.org>
Sat, 8 Feb 2020 16:21:07 +0000 (17:21 +0100)
committerDavid Seifert <soap@gentoo.org>
Sat, 8 Feb 2020 16:21:07 +0000 (17:21 +0100)
Signed-off-by: David Seifert <soap@gentoo.org>
21 files changed:
dev-db/postgresql/postgresql-10.10.ebuild
dev-db/postgresql/postgresql-10.11.ebuild
dev-db/postgresql/postgresql-10.9.ebuild
dev-db/postgresql/postgresql-11.4.ebuild
dev-db/postgresql/postgresql-11.5.ebuild
dev-db/postgresql/postgresql-11.6.ebuild
dev-db/postgresql/postgresql-12.0.ebuild
dev-db/postgresql/postgresql-12.1.ebuild
dev-db/postgresql/postgresql-9.4.22-r1.ebuild
dev-db/postgresql/postgresql-9.4.23.ebuild
dev-db/postgresql/postgresql-9.4.24.ebuild
dev-db/postgresql/postgresql-9.4.25.ebuild
dev-db/postgresql/postgresql-9.5.17-r1.ebuild
dev-db/postgresql/postgresql-9.5.18.ebuild
dev-db/postgresql/postgresql-9.5.19.ebuild
dev-db/postgresql/postgresql-9.5.20.ebuild
dev-db/postgresql/postgresql-9.6.13-r1.ebuild
dev-db/postgresql/postgresql-9.6.14.ebuild
dev-db/postgresql/postgresql-9.6.15.ebuild
dev-db/postgresql/postgresql-9.6.16.ebuild
dev-db/postgresql/postgresql-9999.ebuild

index 4c21bf2c2fd857d3d80c91ac33446833b7da5e60..85088dae26457fbbff3dbd62c452f442c96eb867 100644 (file)
@@ -132,7 +132,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -281,7 +281,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -292,11 +292,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -330,15 +330,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -347,7 +347,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -359,7 +359,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -399,9 +399,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -444,7 +444,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 4db1706faa4c6bf967b2f0302619dc8422524487..1070f1654e7ebff5c32d665be6241fe1818c3f69 100644 (file)
@@ -132,7 +132,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -281,7 +281,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -292,11 +292,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -330,15 +330,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -347,7 +347,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -359,7 +359,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -399,9 +399,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -444,7 +444,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index dfd737bb1a58be5f14f2b6ed6ab06cad80b4fe10..0171a97ac85922693cd8819593a2149b1c8df6dc 100644 (file)
@@ -132,7 +132,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -281,7 +281,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -292,11 +292,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -330,15 +330,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -347,7 +347,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -359,7 +359,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -399,9 +399,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -444,7 +444,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 2a0a71668e6fb7caf430fe9d191a62dd22f7a52e..b998144e091ecff77c0ed8fa3d74c85cadef2f93 100644 (file)
@@ -133,7 +133,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -283,7 +283,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -294,11 +294,11 @@ pkg_postinst() {
                elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -332,15 +332,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -349,7 +349,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -361,7 +361,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -401,9 +401,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -446,7 +446,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 665416e9dcbccd12bc99e2726edd037c4127355a..67c77e9b5084c65e9210e02c2b74cd093f253261 100644 (file)
@@ -133,7 +133,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -283,7 +283,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -294,11 +294,11 @@ pkg_postinst() {
                elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -332,15 +332,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -349,7 +349,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -361,7 +361,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -401,9 +401,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -446,7 +446,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index bd2130f6d42f310b1d309f92c1f2d3d5adc303b6..d95233353b91a74e0bfb0d10b39df45a513ad32c 100644 (file)
@@ -133,7 +133,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -283,7 +283,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -294,11 +294,11 @@ pkg_postinst() {
                elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -332,15 +332,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -349,7 +349,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -361,7 +361,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -401,9 +401,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -446,7 +446,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 5bc6cd4acf1059238de5687b3cac08cf4215c0d8..f0a9f339f7f991f51879721bea5a12521832957d 100644 (file)
@@ -133,7 +133,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -283,7 +283,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -294,11 +294,11 @@ pkg_postinst() {
                elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -332,15 +332,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -349,7 +349,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -361,7 +361,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -401,9 +401,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -446,7 +446,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 1202ea0846982654c0f49e9e4e674899395e3e7f..92a7fbe7985f6c9f997af8aa9c8bb757f73dd14e 100644 (file)
@@ -133,7 +133,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -283,7 +283,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -294,11 +294,11 @@ pkg_postinst() {
                elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -332,15 +332,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -349,7 +349,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -361,7 +361,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -401,9 +401,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -446,7 +446,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 43043da262199ba04b301bff92b786a4f02cef66..d7b84d15b9ce9f63f6aff9a17f4763f009a003fd 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -290,7 +290,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -308,7 +308,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -319,11 +319,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -349,15 +349,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -366,7 +366,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -378,7 +378,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -418,9 +418,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -458,7 +458,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 5d6471258c662f2c39a06ca9d9adac1965402955..e7826a9966aba08bf6435b07163eafc1307f08b7 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -290,7 +290,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -308,7 +308,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -319,11 +319,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -349,15 +349,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -366,7 +366,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -378,7 +378,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -418,9 +418,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -458,7 +458,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 43043da262199ba04b301bff92b786a4f02cef66..d7b84d15b9ce9f63f6aff9a17f4763f009a003fd 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -290,7 +290,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -308,7 +308,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -319,11 +319,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -349,15 +349,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -366,7 +366,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -378,7 +378,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -418,9 +418,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -458,7 +458,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index dccd9372c733325d7652543bdbd4c54e686a9859..4afb351102c4d5b8e02bd0a73079d59006591344 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -290,7 +290,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -308,7 +308,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -319,11 +319,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -349,15 +349,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -366,7 +366,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -378,7 +378,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -418,9 +418,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -458,7 +458,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 1b7912c6d02bcc6b5d12ba0e0de397dd8d214786..e92d7bb0834dba53dcf71fe3e50587ee6a006026 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -291,7 +291,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        fi
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -464,7 +464,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index f6e7247b9104a26305133b89ec0f156ff09c7f8b..f316af45dac17730a35557559960ed418ee8451c 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -291,7 +291,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        fi
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -464,7 +464,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 1b7912c6d02bcc6b5d12ba0e0de397dd8d214786..e92d7bb0834dba53dcf71fe3e50587ee6a006026 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -291,7 +291,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        fi
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -464,7 +464,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 0631e478db3b697846a53609fec3bba6bdd458e1..d86d352551bd0e5627df61686050cf29423622e2 100644 (file)
@@ -127,7 +127,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -291,7 +291,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        fi
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -464,7 +464,7 @@ pkg_config() {
                einfo "Or move the configuration files back:"
                einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 1a29814072289dd9f65cd3b994188b2cc21bc969..58e85bd619b047f4a1dca2849b20a4f1ebe491fc 100644 (file)
@@ -131,7 +131,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -296,7 +296,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -469,7 +469,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 2334b0f00b3ecfd4a26a0cfc1fbaacfcea000ff3..b86aebf664afe266159cb2b82d4f0ecaecc298a5 100644 (file)
@@ -131,7 +131,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -296,7 +296,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -469,7 +469,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 1a29814072289dd9f65cd3b994188b2cc21bc969..58e85bd619b047f4a1dca2849b20a4f1ebe491fc 100644 (file)
@@ -131,7 +131,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -296,7 +296,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -469,7 +469,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index f4a28fd7b81c805ab3b682397ec6304f158fa9b1..145faa5a444ef95da334b85ad6104e4cd565a4dc 100644 (file)
@@ -131,7 +131,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -296,7 +296,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
                        rm "${l}" || ewarn "Couldn't remove ${l}"
                fi
@@ -314,7 +314,7 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        if use server ; then
                elog
@@ -325,11 +325,11 @@ pkg_postinst() {
                elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
                elog
                elog "The default location of the Unix-domain socket is:"
-               elog "    ${EROOT%/}/run/postgresql/"
+               elog "    ${EROOT}/run/postgresql/"
                elog
                elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
                elog "so that it contains your preferred locale in:"
-               elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+               elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
                elog
                elog "Then, execute the following command to setup the initial database"
                elog "environment:"
@@ -355,15 +355,15 @@ pkg_postrm() {
 pkg_config() {
        use server || die "USE flag 'server' not enabled. Nothing to configure."
 
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -372,7 +372,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -384,7 +384,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -424,9 +424,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -469,7 +469,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }
index 7d2460caf77fb54602371d5dec07209d9974a399..803bd0b9076d3be7e3bbc31e28147811fa5b6368 100644 (file)
@@ -158,7 +158,7 @@ src_configure() {
        export LDFLAGS_SL="${LDFLAGS}"
        export LDFLAGS_EX="${LDFLAGS}"
 
-       local PO="${EPREFIX%/}"
+       local PO="${EPREFIX}"
 
        local i uuid_config=""
        if use uuid; then
@@ -300,7 +300,7 @@ pkg_preinst() {
        local l
        # First remove any symlinks in /usr/bin that may have been created
        # by the old eselect
-       for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+       for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
                [[ $(${canonicalise} "${l}") == *postgresql-9.7* ]] && rm "${l}"
        done
 
@@ -316,21 +316,21 @@ pkg_postinst() {
        postgresql-config update
 
        elog "If you need a global psqlrc-file, you can place it in:"
-       elog "    ${EROOT%/}/etc/postgresql-${SLOT}/"
+       elog "    ${EROOT}/etc/postgresql-${SLOT}/"
 
        elog
        elog "Gentoo specific documentation:"
        elog "https://wiki.gentoo.org/wiki/PostgreSQL"
        elog
        elog "Official documentation:"
-       elog "${EROOT%/}/usr/share/doc/${PF}/html"
+       elog "${EROOT}/usr/share/doc/${PF}/html"
        elog
        elog "The default location of the Unix-domain socket is:"
-       elog "    ${EROOT%/}/run/postgresql/"
+       elog "    ${EROOT}/run/postgresql/"
        elog
        elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
        elog "so that it contains your preferred locale, and other options, in:"
-       elog "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       elog "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        elog
        elog "Then, execute the following command to setup the initial database"
        elog "environment:"
@@ -353,15 +353,15 @@ pkg_postrm() {
 }
 
 pkg_config() {
-       [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
-               && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
-       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+       [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+               && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+       [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
        [[ -z "${DATA_DIR}" ]] \
-               && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+               && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
 
        # environment.bz2 may not contain the same locale as the current system
        # locale. Unset and source from the current system locale.
-       if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+       if [ -f "${EROOT}/etc/env.d/02locale" ]; then
                unset LANG
                unset LC_CTYPE
                unset LC_NUMERIC
@@ -370,7 +370,7 @@ pkg_config() {
                unset LC_MONETARY
                unset LC_MESSAGES
                unset LC_ALL
-               source "${EROOT%/}/etc/env.d/02locale"
+               source "${EROOT}/etc/env.d/02locale"
                [ -n "${LANG}" ] && export LANG
                [ -n "${LC_CTYPE}" ] && export LC_CTYPE
                [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
@@ -382,7 +382,7 @@ pkg_config() {
        fi
 
        einfo "You can modify the paths and options passed to initdb by editing:"
-       einfo "    ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+       einfo "    ${EROOT}/etc/conf.d/postgresql-${SLOT}"
        einfo
        einfo "Information on options that can be passed to initdb are found at:"
        einfo "    https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
@@ -422,9 +422,9 @@ 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}
+               "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
        fi
 
        if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
@@ -467,7 +467,7 @@ pkg_config() {
                einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        else
-               einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+               einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
                einfo "instead of 'pg_ctl'."
        fi
 }