Added patch from Alon Bar-Lev <alon.barlev@gmail.com> for bug #148498 and also a patch from Robin H. Johnson <robbat2@gentoo.org> to support git-based kernels.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@445 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 19 years ago
parent 6869de7a01
commit b931ed00a0

@ -38,9 +38,19 @@ get_KV() {
cd ${KERNEL_DIR}
#compile_generic prepare kernel > /dev/null 2>&1
cd - > /dev/null 2>&1
if [ -f ${KERNEL_DIR}/include/linux/version.h ]
[ -f "${KERNEL_DIR}/include/linux/version.h" ] && \
VERSION_SOURCE="${KERNEL_DIR}/include/linux/version.h"
[ -f "${KERNEL_DIR}/include/linux/utsrelease.h" ] && \
VERSION_SOURCE="${KERNEL_DIR}/include/linux/utsrelease.h"
# Handle new-style releases where version.h doesn't have UTS_RELEASE
if [ -f ${KERNEL_DIR}/include/config/kernel.release ]
then
UTS_RELEASE=`grep UTS_RELEASE ${KERNEL_DIR}/include/linux/version.h | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'`
UTS_RELEASE=`cat ${KERNEL_DIR}/include/config/kernel.release`
LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"`
KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
elif [ -n "${VERSION_SOURCE}" ]
then
UTS_RELEASE=`grep UTS_RELEASE ${VERSION_SOURCE} | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'`
LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"`
KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
else

Loading…
Cancel
Save