From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 25D3D15807A for ; Thu, 05 Jun 2025 10:56:13 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 1112F343118 for ; Thu, 05 Jun 2025 10:56:13 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id B1F3E11047E; Thu, 05 Jun 2025 10:56:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A81CF11047E for ; Thu, 05 Jun 2025 10:56:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 61F0533BEA5 for ; Thu, 05 Jun 2025 10:56:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D0AE02903 for ; Thu, 05 Jun 2025 10:56:02 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1749120907.582a2c2f0756c68d4a51be7a4f408eb71d5797a6.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/linux-info.eclass X-VCS-Directories: eclass/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 582a2c2f0756c68d4a51be7a4f408eb71d5797a6 X-VCS-Branch: master Date: Thu, 05 Jun 2025 10:56:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8a860204-b319-40c2-b8ca-882f283afb6c X-Archives-Hash: f8ff77251806ee1141ae951e980f5dd7 commit: 582a2c2f0756c68d4a51be7a4f408eb71d5797a6 Author: James Le Cuirot gentoo org> AuthorDate: Fri May 23 09:40:55 2025 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Thu Jun 5 10:55:07 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=582a2c2f linux-info.eclass: Don't try to read KBUILD_OUTPUT from the Makefile This code originates from 21 years ago, but I don't think it ever made sense. KBUILD_OUTPUT was never written anywhere until last year. Now it is written to the Makefile in the output directory, which is what we're trying to locate in the first place! Signed-off-by: James Le Cuirot gentoo.org> eclass/linux-info.eclass | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index c395eca9ee85..067c94ccdc1f 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -464,25 +464,6 @@ kernel_is() { "${1:-${KV_MAJOR:-0}}.${2:-${KV_MINOR:-0}}.${3:-${KV_PATCH:-0}}" } -# @FUNCTION: get_makefile_extract_function -# @INTERNAL -# @DESCRIPTION: -# Check if the Makefile is valid for direct parsing. -# Check status results: -# - PASS, use 'getfilevar' to extract values -# - FAIL, use 'getfilevar_noexec' to extract values -# The check may fail if: -# - make is not present -# - corruption exists in the kernel makefile -get_makefile_extract_function() { - [[ -n ${SKIP_KERNEL_CHECK} ]] && return - local a='' b='' mkfunc='getfilevar' - a="$(getfilevar VERSION ${KERNEL_MAKEFILE})" - b="$(getfilevar_noexec VERSION ${KERNEL_MAKEFILE})" - [[ "${a}" != "${b}" ]] && mkfunc='getfilevar_noexec' - echo "${mkfunc}" -} - # @ECLASS_VARIABLE: get_version_warning_done # @INTERNAL # @DESCRIPTION: @@ -567,14 +548,6 @@ get_version() { # Do we pass KBUILD_OUTPUT on the CLI? local OUTPUT_DIR=${KBUILD_OUTPUT} - if [[ -z ${OUTPUT_DIR} ]]; then - # Decide the function used to extract makefile variables. - local mkfunc=$(get_makefile_extract_function "${KERNEL_MAKEFILE}") - - # And if we didn't pass it, we can take a nosey in the Makefile. - OUTPUT_DIR=$(${mkfunc} KBUILD_OUTPUT "${KERNEL_MAKEFILE}") - fi - # And contrary to existing functions, I feel we shouldn't trust the # directory name to find version information as this seems insane. # So we parse ${KERNEL_MAKEFILE}.