• [gentoo-dev] [PATCH] kernel-build.eclass: Fix handling savedconfig w/o

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Aug 30 14:30:01 2024
    Fix the new savedconfig logic not to require preexisting `.config`
    if savedconfig will be used. This is needed to handle architectures
    where we do not supply default configs, and savedconfig is the only
    option.

    Fixes: e290c3c78b7a ("...: Apply savedconfig on top of merged configs")
    Closes: https://bugs.gentoo.org/938725
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/kernel-build.eclass | 8 +++++++-
    1 file changed, 7 insertions(+), 1 deletion(-)

    diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
    index be02920162f4..6471cbb3e254 100644
    --- a/eclass/kernel-build.eclass
    +++ b/eclass/kernel-build.eclass
    @@ -243,7 +243,13 @@ kernel-build_src_configure() {
    MAKEARGS+=( KBZIP2="lbzip2" )
    fi

    - [[ -f .config ]] || die "Ebuild error: please copy default config into .config"
    + if [[ ! -f .config ]]; then
    + if use savedconfig; then
    + > .config || die
    + else
    + die "Ebuild error: please copy default config into .config"
    + fi
    + fi

    if [[ -z "${KV_LOCALVERSION}" ]]; then
    KV_LOCALVERSION=$(sed -n -e 's#^CONFIG_LOCALVERSION="\(.*\)"$#\1#p' \
    --
    2.46.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)