From 144845988878c8a87bf5d67cfbe416636dacab17 Mon Sep 17 00:00:00 2001 From: Elouan Lesteven Date: Sat, 25 Apr 2026 22:13:03 +0200 Subject: [PATCH] crossdev: refuse to delete the host toolchain avoids nuking a whole system by misinputing the name of the toolchain you want to --clean Signed-off-by: Elouan Lesteven --- crossdev | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crossdev b/crossdev index 0c1b16e..221020b 100755 --- a/crossdev +++ b/crossdev @@ -733,6 +733,14 @@ uninstall() { setup_portage_vars + for hchost in "${HCHOSTS[@]}"; do + if [[ ${hchost} == "${CTARGET}" ]] ; then + eerror "Refusing to delete a cross-compiler using the same" + eerror "target name as your host utils." + exit 1 + fi + done + ewarn "Uninstalling target '${CTARGET}' ..." # clean out portage config files