Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 417263 | Differences between
and this patch

Collapse All | Expand All

(-)/var/db/repos/gentoo/sys-apps/busybox/busybox-1.31.1-r3.ebuild (-9 / +11 lines)
Lines 303-316 Link Here
303
}
303
}
304
304
305
pkg_preinst() {
305
pkg_preinst() {
306
	if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then
307
		ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
308
		ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
309
		ewarn "If you are creating a binary only and not merging this is probably ok."
310
		ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
311
		die "silly options will destroy your system"
312
	fi
313
314
	if use make-symlinks ; then
306
	if use make-symlinks ; then
315
		mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
307
		mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
316
	fi
308
	fi
Lines 322-328 Link Here
322
	if use make-symlinks ; then
314
	if use make-symlinks ; then
323
		cd "${T}" || die
315
		cd "${T}" || die
324
		mkdir _install
316
		mkdir _install
325
		tar xf busybox-links.tar -C _install || die
317
		safelinks=$(
318
			tar tf busybox-links.tar |
319
			grep -v '/$' |
320
			while read f; do
321
				PATH="${ROOT}/usr/sbin:${ROOT}/usr/bin:${ROOT}/sbin:${ROOT}/bin" \
322
				which "$(basename ${f})" >/dev/null 2>&1 ||
323
				echo "${f}"
324
			done
325
		)
326
		[[ -n "${safelinks}" ]] || die "no links to copy safely, would destroy your system: remove USE=make-symlinks"
327
		tar xf busybox-links.tar -C _install ${safelinks} || die
326
		cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
328
		cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
327
	fi
329
	fi
328
330

Return to bug 417263