commit:     58414b6f079cd6e3134624c6b834f39b87d0a925
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  2 11:41:06 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov  2 11:42:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58414b6f

sys-apps/busybox: fix 'make-symlinks' safeguard

Thanks-to: Ionen Wolkens <sudinave <AT> gmail.com>
Bug: https://bugs.gentoo.org/703936
Closes: https://bugs.gentoo.org/752162
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../busybox/{busybox-1.31.1-r2.ebuild => busybox-1.31.1-r3.ebuild}  | 2 +-
 .../busybox/{busybox-1.32.0.ebuild => busybox-1.32.0-r1.ebuild}     | 2 +-
 sys-apps/busybox/busybox-9999.ebuild                                | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys-apps/busybox/busybox-1.31.1-r2.ebuild 
b/sys-apps/busybox/busybox-1.31.1-r3.ebuild
similarity index 99%
rename from sys-apps/busybox/busybox-1.31.1-r2.ebuild
rename to sys-apps/busybox/busybox-1.31.1-r3.ebuild
index 8457f9229a4..ad50d096b74 100644
--- a/sys-apps/busybox/busybox-1.31.1-r2.ebuild
+++ b/sys-apps/busybox/busybox-1.31.1-r3.ebuild
@@ -303,7 +303,7 @@ src_install() {
 }
 
 pkg_preinst() {
-       if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && 
[[ ${ROOT} == "/" ]] ; then
+       if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && 
[[ -z "${ROOT}" ]] ; then
                ewarn "setting USE=make-symlinks and emerging to / is very 
dangerous."
                ewarn "it WILL overwrite lots of system programs like: ls bash 
awk grep (bug 60805 for full list)."
                ewarn "If you are creating a binary only and not merging this 
is probably ok."

diff --git a/sys-apps/busybox/busybox-1.32.0.ebuild 
b/sys-apps/busybox/busybox-1.32.0-r1.ebuild
similarity index 99%
rename from sys-apps/busybox/busybox-1.32.0.ebuild
rename to sys-apps/busybox/busybox-1.32.0-r1.ebuild
index e4d93e71de3..6d7a5811169 100644
--- a/sys-apps/busybox/busybox-1.32.0.ebuild
+++ b/sys-apps/busybox/busybox-1.32.0-r1.ebuild
@@ -302,7 +302,7 @@ src_install() {
 }
 
 pkg_preinst() {
-       if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && 
[[ ${ROOT} == "/" ]] ; then
+       if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && 
[[ -z "${ROOT}" ]] ; then
                ewarn "setting USE=make-symlinks and emerging to / is very 
dangerous."
                ewarn "it WILL overwrite lots of system programs like: ls bash 
awk grep (bug 60805 for full list)."
                ewarn "If you are creating a binary only and not merging this 
is probably ok."

diff --git a/sys-apps/busybox/busybox-9999.ebuild 
b/sys-apps/busybox/busybox-9999.ebuild
index bf29c9fb1d8..a82a8aa3331 100644
--- a/sys-apps/busybox/busybox-9999.ebuild
+++ b/sys-apps/busybox/busybox-9999.ebuild
@@ -3,7 +3,7 @@
 
 # See `man savedconfig.eclass` for info on how to use USE=savedconfig.
 
-EAPI=6
+EAPI=7
 
 inherit flag-o-matic savedconfig toolchain-funcs
 
@@ -33,7 +33,7 @@ DEPEND="${COMMON_DEPEND}
 RDEPEND="${COMMON_DEPEND}
        mdev? ( !<sys-apps/openrc-0.13 )"
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
 
 busybox_config_option() {
        local flag=$1 ; shift
@@ -298,7 +298,7 @@ src_install() {
 }
 
 pkg_preinst() {
-       if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && 
[[ ${ROOT} == "/" ]] ; then
+       if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && 
[[ -z "${ROOT}" ]] ; then
                ewarn "setting USE=make-symlinks and emerging to / is very 
dangerous."
                ewarn "it WILL overwrite lots of system programs like: ls bash 
awk grep (bug 60805 for full list)."
                ewarn "If you are creating a binary only and not merging this 
is probably ok."

Reply via email to