Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 203706 Details for
Bug 87242
linux-info.eclass: unable to find kernel version - SUBLEVEL and EXTRAVERSION not present when using KBUILD_OUTPUT
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against linux-info.eclass v1.71 (as of 2009-09-09)
linux-info.eclass-20090909.patch (text/plain), 3.46 KB, created by
Bruno
on 2009-09-10 20:28:10 UTC
(
hide
)
Description:
Patch against linux-info.eclass v1.71 (as of 2009-09-09)
Filename:
MIME Type:
Creator:
Bruno
Created:
2009-09-10 20:28:10 UTC
Size:
3.46 KB
patch
obsolete
>--- ../linux-info-1.71.eclass 2009-09-08 21:54:01.000000000 +0200 >+++ linux-info.eclass 2009-09-09 21:27:49.000000000 +0200 >@@ -424,13 +424,54 @@ get_version() { > # if we dont know KV_FULL, then we need too. > # make sure KV_DIR isnt set since we need to work it out via KERNEL_DIR > unset KV_DIR >+ unset OUTPUT_DIR > >- # KV_DIR will contain the full path to the sources directory we should use > [ -z "${get_version_warning_done}" ] && \ > qeinfo "Determining the location of the kernel source code" >- [ -h "${KERNEL_DIR}" ] && KV_DIR="$(readlink -f ${KERNEL_DIR})" >- [ -d "${KERNEL_DIR}" ] && KV_DIR="${KERNEL_DIR}" > >+ if [ -n "${KBUILD_OUTPUT}" ]; then >+ if [ -s "${KBUILD_OUTPUT}/Makefile" ]; then >+ if [ -z "${get_version_warning_done}" ]; then >+ get_version_warning_done=1 >+ qeerror "Could not find a Makefile in the kernel build directory." >+ qeerror "Please ensure that ${KBUILD_OUTPUT} points to an initialized" >+ qeerror "kernel output directory." >+ fi >+ return 1 >+ else >+ local make_args="$(getfilevar MAKEARGS ${KBUILD_OUTPUT}/Makefile)" >+ if [ -n "${make_args}" ]; then >+ # 2.6.25 or more recent Makefile of KBUILD_OUTPUT >+ [ -z "${get_version_warning_done}" ] && \ >+ qeinfo "This KBUILD_OUTPUT makefile looks like 2.6.25 or more recent format" >+ OUTPUT_DIR=$(echo ${make_args} | sed -r -e 's:^(.* )?O=([^ ]*)/\.( .*)?$:\2:') >+ KV_DIR=$(echo ${make_args} | sed -r -e 's:^(.* )?-C ([^ ]*)/? .*$:\2:') >+ else >+ # Attempt vars as in KBUILD_OUTPUT Makefile of older kernels >+ OUTPUT_DIR="$(getfilevar_noexec KERNELOUTPUT ${KBUILD_OUTPUT}/Makefile)" >+ KV_DIR="$(getfilevar_noexec KERNELSRC ${KBUILD_OUTPUT}/Makefile)" >+ fi >+ if [ -z "${KV_DIR}" ] && [ -n "$(getfilevar_noexec SUBLEVEL ${KBUILD_OUTPUT}/Makefile)" ]; then >+ # KBUILD_OUTPUT is the same as KERNEL_DIR >+ OUTPUT_DIR="${KBUILD_OUTPUT}" >+ KV_DIR="${KBUILD_OUTPUT}" >+ elif [ -z "${KV_DIR}" ]; then >+ if [ -z "${get_version_warning_done}" ]; then >+ get_version_warning_done=1 >+ qeerror "Can't figure out anything out of ${KBUILD_OUTPUT}," >+ qeerror "make sure it points to a valid kernel object tree or" >+ qeerror "kernel source tree if you build in tree." >+ fi >+ return 1 >+ fi >+ fi >+ fi >+ >+ if [ -z "${KV_DIR}" ]; then >+ # KV_DIR will contain the full path to the sources directory we should use >+ [ -h "${KERNEL_DIR}" ] && KV_DIR="$(readlink -f ${KERNEL_DIR})" >+ [ -d "${KERNEL_DIR}" ] && KV_DIR="${KERNEL_DIR}" >+ fi > if [ -z "${KV_DIR}" ] > then > if [ -z "${get_version_warning_done}" ]; then >@@ -463,16 +504,6 @@ get_version() { > return 1 > fi > >- # OK so now we know our sources directory, but they might be using >- # KBUILD_OUTPUT, and we need this for .config and localversions-* >- # so we better find it eh? >- # do we pass KBUILD_OUTPUT on the CLI? >- OUTPUT_DIR="${OUTPUT_DIR:-${KBUILD_OUTPUT}}" >- >- # And if we didn't pass it, we can take a nosey in the Makefile >- kbuild_output="$(getfilevar_noexec KBUILD_OUTPUT ${KV_DIR}/Makefile)" >- OUTPUT_DIR="${OUTPUT_DIR:-${kbuild_output}}" >- > # 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 >@@ -489,6 +520,8 @@ get_version() { > qeerror "Please ensure that ${KERNEL_DIR} points to a complete set of Linux sources." > fi > return 1 >+ elif [ -z "${OUTPUT_DIR}" -a -s "${KV_DIR}/.config" ]; then >+ OUTPUT_DIR="${KV_DIR}" > fi > > # and in newer versions we can also pull LOCALVERSION if it is set.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 87242
:
66083
|
117659
|
153403
|
203372
|
203706
|
203709
|
212561
|
212562
|
216766
|
216846
|
216847