commit:     d52a8034b002b208fdb5dab40e3c560f9b73629b
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 13 22:32:49 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Mar 13 22:33:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d52a8034

sys-apps/systemd: fix install with USE="-sysv-utils usrmerge"

Closes: https://bugs.gentoo.org/650442
Package-Manager: Portage-2.3.24, Repoman-2.3.6_p81

 sys-apps/systemd/systemd-238-r1.ebuild | 5 +++--
 sys-apps/systemd/systemd-9999.ebuild   | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/sys-apps/systemd/systemd-238-r1.ebuild 
b/sys-apps/systemd/systemd-238-r1.ebuild
index d32d1e9d3d3..1cfd6153c46 100644
--- a/sys-apps/systemd/systemd-238-r1.ebuild
+++ b/sys-apps/systemd/systemd-238-r1.ebuild
@@ -303,8 +303,9 @@ multilib_src_install_all() {
        dodoc "${FILESDIR}"/nsswitch.conf
 
        if ! use sysv-utils; then
-               rm 
"${ED%/}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
-               rmdir "${ED%/}"/sbin || die
+               local rootprefix=$(usex usrmerge /usr '')
+               rm 
"${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit}
 || die
+               rmdir "${ED%/}${rootprefix}"/sbin || die
                rm "${ED%/}"/usr/share/man/man1/init.1 || die
                rm 
"${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 
|| die
        fi

diff --git a/sys-apps/systemd/systemd-9999.ebuild 
b/sys-apps/systemd/systemd-9999.ebuild
index 6c34c1b92a0..44e359bc511 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -301,8 +301,9 @@ multilib_src_install_all() {
        dodoc "${FILESDIR}"/nsswitch.conf
 
        if ! use sysv-utils; then
-               rm 
"${ED%/}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
-               rmdir "${ED%/}"/sbin || die
+               local rootprefix=$(usex usrmerge /usr '')
+               rm 
"${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit}
 || die
+               rmdir "${ED%/}${rootprefix}"/sbin || die
                rm "${ED%/}"/usr/share/man/man1/init.1 || die
                rm 
"${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 
|| die
        fi

Reply via email to