From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NTtS3-0005VP-Hc for garchives@archives.gentoo.org; Sun, 10 Jan 2010 08:47:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B772BE0466; Sun, 10 Jan 2010 08:47:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 736A4E0466 for ; Sun, 10 Jan 2010 08:47:04 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 21D301B41B9 for ; Sun, 10 Jan 2010 08:47:04 +0000 (UTC) Received: from robbat2 by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NTtRu-0003DF-2J for gentoo-commits@lists.gentoo.org; Sun, 10 Jan 2010 08:47:02 +0000 From: "Robin H. Johnson (robbat2)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, robbat2@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: linux-info.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: linux-info.eclass X-VCS-Directories: eclass X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson Content-Type: text/plain; charset=utf8 Message-Id: Sender: "Robin H. Johnson" Date: Sun, 10 Jan 2010 08:47:02 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 8198c059-515a-4b9e-beaf-29859e16df68 X-Archives-Hash: e35f25420eba0cc995d6253db1238de6 robbat2 10/01/10 08:47:02 Modified: linux-info.eclass Log: Bug #300306, #167385: One side effect of the non-exec check version for= the kernel makefile is that it did not pick up appends, breaking builds = on some patched kernels. Try the exec version first now, with a fallback. Revision Changes Path 1.78 eclass/linux-info.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/linux-info.= eclass?rev=3D1.78&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/linux-info.= eclass?rev=3D1.78&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/linux-info.= eclass?r1=3D1.77&r2=3D1.78 Index: linux-info.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v retrieving revision 1.77 retrieving revision 1.78 diff -p -w -b -B -u -u -r1.77 -r1.78 --- linux-info.eclass 10 Jan 2010 08:25:55 -0000 1.77 +++ linux-info.eclass 10 Jan 2010 08:47:01 -0000 1.78 @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.77 2010/= 01/10 08:25:55 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.78 2010/= 01/10 08:47:01 robbat2 Exp $ # # Original author: John Mylchreest # Maintainer: kernel-misc@gentoo.org @@ -490,17 +490,32 @@ get_version() { # do we pass KBUILD_OUTPUT on the CLI? OUTPUT_DIR=3D"${OUTPUT_DIR:-${KBUILD_OUTPUT}}" =20 + # keep track of it + KERNEL_MAKEFILE=3D"${KV_DIR}/Makefile" + + # 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 + local a=3D'' b=3D'' mkfunc=3D'getfilevar' + a=3D"$(getfilevar VERSION ${KERNEL_MAKEFILE})" + b=3D"$(getfilevar_noexec VERSION ${KERNEL_MAKEFILE})" + [[ "${a}" !=3D "${b}" ]] && mkfunc=3D'getfilevar_noexec' + # And if we didn't pass it, we can take a nosey in the Makefile - kbuild_output=3D"$(getfilevar_noexec KBUILD_OUTPUT ${KV_DIR}/Makefile)" + kbuild_output=3D"$(${mkfunc} KBUILD_OUTPUT ${KERNEL_MAKEFILE})" OUTPUT_DIR=3D"${OUTPUT_DIR:-${kbuild_output}}" =20 # 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 ${KV_DIR}/Makefile - KV_MAJOR=3D"$(getfilevar_noexec VERSION ${KV_DIR}/Makefile)" - KV_MINOR=3D"$(getfilevar_noexec PATCHLEVEL ${KV_DIR}/Makefile)" - KV_PATCH=3D"$(getfilevar_noexec SUBLEVEL ${KV_DIR}/Makefile)" - KV_EXTRA=3D"$(getfilevar_noexec EXTRAVERSION ${KV_DIR}/Makefile)" + # so we parse ${KERNEL_MAKEFILE} + KV_MAJOR=3D"$(${mkfunc} VERSION ${KERNEL_MAKEFILE})" + KV_MINOR=3D"$(${mkfunc} PATCHLEVEL ${KERNEL_MAKEFILE})" + KV_PATCH=3D"$(${mkfunc} SUBLEVEL ${KERNEL_MAKEFILE})" + KV_EXTRA=3D"$(${mkfunc} EXTRAVERSION ${KERNEL_MAKEFILE})" =20 if [ -z "${KV_MAJOR}" -o -z "${KV_MINOR}" -o -z "${KV_PATCH}" ] then