From 0156b5084688835a6d6ef6e90ddf3507ba9fa9ff Mon Sep 17 00:00:00 2001 From: Alexander Barker Date: Wed, 22 Apr 2026 19:45:17 -0700 Subject: [PATCH] crossdev: don't crate files on root / This resoves an issue where undefined K2PKG / K3PKG would result in files being created in / Closes: https://bugs.gentoo.org/973095 Signed-off-by: Alexander Barker (https://github.com/kwhat) --- crossdev | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crossdev b/crossdev index 0c1b16e..be441a1 100755 --- a/crossdev +++ b/crossdev @@ -949,6 +949,8 @@ AENV="" BCAT="sys-devel" ; BPKG="binutils" ; BVER="" BUSE="" BENV="" BOVL="" BMASK="" BFORCE="" GCAT="sys-devel" ; GPKG="gcc" ; GVER="" GUSE="" GENV="" GOVL="" GMASK="" GFORCE="" KCAT="sys-kernel" ; KPKG="linux-headers" ; KVER="" KUSE="" KENV="" KOVL="" KMASK="" KFORCE="" +K2CAT="[none]" ; K2PKG="[none]" ; K2VER="" K2USE="" K2ENV="" K2OVL="" K2MASK="" K2FORCE="" +K3CAT="[none]" ; K3PKG="[none]" ; K3VER="" K3USE="" K3ENV="" K3OVL="" K3MASK="" K3FORCE="" LCAT="sys-libs" ; LPKG="[none]" ; LVER="" LUSE="" LENV="" LOVL="" LMASK="" LFORCE="" DCAT="dev-debug" ; DPKG="gdb" ; DVER="" DUSE="" DENV="" DOVL="" DMASK="" DFORCE="" RCAT="llvm-runtimes" ; RPKG="compiler-rt" ; RVER="" RUSE="" RENV="" ROVL="" RMASK="" RFORCE="" @@ -1977,7 +1979,7 @@ if ! ex_fast ; then USE="${KUSE} ${USE} headers-only" \ doemerge ${KPKG} ${KPKG}-stage1 - if [[ -n ${K2PKG} ]] ; then + if [[ ${K2PKG} != "[none]" ]] ; then # KPKG may need K2PKG to install everything, so # build it as a dependency first. set_eopts_on_pkg_status ${K2PKG} headers-only @@ -1990,7 +1992,7 @@ if ! ex_fast ; then doemerge ${KPKG} ${KPKG}-stage2 fi - if [[ -n ${K3PKG} ]] ; then + if [[ ${K3PKG} != "[none]" ]] ; then # LPKG may need K3PKG to install everything, so # build it as a dependency first. set_eopts_on_pkg_status ${K3PKG} headers-only @@ -2009,13 +2011,13 @@ if ! ex_fast ; then USE="${LUSE} ${USE} ${LUSE_DISABLE}" \ doemerge ${LPKG} - if [[ -n ${K2PKG} ]] ; then + if [[ ${K2PKG} != "[none]" ]] ; then set_eopts_on_pkg_status ${K2PKG} headers-only USE="${KUSE} ${USE} -headers-only" doemerge ${K2PKG} ${K2PKG}-stage2 fi - if [[ -n ${K3PKG} ]] ; then + if [[ ${K3PKG} != "[none]" ]] ; then set_eopts_on_pkg_status ${K3PKG} headers-only USE="${KUSE} ${USE} -headers-only" doemerge ${K3PKG} ${K3PKG}-stage2