Skip to content

crossdev: refuse to delete the host toolchain#40

Open
Leb02 wants to merge 1 commit intogentoo:masterfrom
Leb02:master
Open

crossdev: refuse to delete the host toolchain#40
Leb02 wants to merge 1 commit intogentoo:masterfrom
Leb02:master

Conversation

@Leb02
Copy link
Copy Markdown

@Leb02 Leb02 commented Apr 25, 2026

Fixes an issue where you could delete your host toolchain using the --clean option

avoids nuking a whole system by misinputing the name of the toolchain
you want to --clean

Signed-off-by: Elouan Lesteven <elouan.lesteven@protonmail.com>
Comment thread crossdev

setup_portage_vars

if [[ ${HCHOST} == "${CTARGET}" ]] ; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? Isn't it redundant with the loop below?

setup_portage_vars does:

        # Collect all CHOST* visible for host. We need to make sure
        # not to clobber any of native CHOSTs.
        HCHOSTS=(${HCHOST})
        for abi in $(portageq envvar ABI MULTILIB_ABIS DEFAULT_ABI); do
                HCHOSTS+=($(portageq envvar CHOST_${abi}))
        done

so HCHOSTS always contains HCHOST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants