commit:     13ce42872eebb3cb30f4574dcbd3835d89794bdd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 11 00:12:31 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 11 00:29:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13ce4287

sys-cluster/sanlock: fix VariableScope (EROOT)

EROOT is not defined in src_install.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-cluster/sanlock/sanlock-3.8.2.ebuild | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/sys-cluster/sanlock/sanlock-3.8.2.ebuild 
b/sys-cluster/sanlock/sanlock-3.8.2.ebuild
index 8426d4f6d3c..baada07ab2a 100644
--- a/sys-cluster/sanlock/sanlock-3.8.2.ebuild
+++ b/sys-cluster/sanlock/sanlock-3.8.2.ebuild
@@ -35,7 +35,7 @@ pkg_setup() {
        if linux_config_exists; then
                if ! linux_chkconfig_present SOFT_WATCHDOG; then
                        ewarn ""
-                       ewarn "$warning"
+                       ewarn "${warning}"
                        ewarn ""
                fi
        else
@@ -47,19 +47,29 @@ pkg_setup() {
 
 src_compile() {
        for d in wdmd src fence_sanlock reset; do
-               cd $d; emake; cd ..
+               cd ${d} || die
+               emake
+               cd .. || die
        done
+
        if use python; then
-               cd python; python_foreach_impl emake; cd ..
+               cd python || die
+               python_foreach_impl emake
+               cd .. || die
        fi
 }
 
 src_install() {
        for d in wdmd src fence_sanlock reset; do
-               cd $d; emake DESTDIR="${D}" LIBDIR="${EROOT}usr/$(get_libdir)" 
install; cd ..
+               cd ${d} || die
+               emake DESTDIR="${D}" LIBDIR="${EPREFIX}/usr/$(get_libdir)" 
install
+               cd .. || die
        done
+
        if use python; then
-               cd python; python_foreach_impl emake DESTDIR="${D}" install; cd 
..
+               cd python || die
+               python_foreach_impl emake DESTDIR="${D}" install
+               cd .. || die
        fi
 
        # config
@@ -78,7 +88,7 @@ src_install() {
 
        # systemd
        systemd_newunit init.d/sanlock.service.native sanlock.service
-       sed -i 's,^ExecStartPre=,#ExecStartPre=,' init.d/wdmd.service.native
+       sed -i 's,^ExecStartPre=,#ExecStartPre=,' init.d/wdmd.service.native || 
die
        systemd_newunit init.d/wdmd.service.native wdmd.service
        systemd_dounit init.d/sanlk-resetd.service
        #systemd_dounit ${FILESDIR}/fence_sanlockd.service

Reply via email to