Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 469210 | Differences between
and this patch

Collapse All | Expand All

(-)linux-info.eclass.orig (-23 lines)
Lines 400-420 Link Here
400
	echo ${x}
400
	echo ${x}
401
}
401
}
402
402
403
# Check if the Makefile is valid for direct parsing.
404
# Check status results:
405
# - PASS, use 'getfilevar' to extract values
406
# - FAIL, use 'getfilevar_noexec' to extract values
407
# The check may fail if:
408
# - make is not present
409
# - corruption exists in the kernel makefile
410
get_makefile_extract_function() {
411
	local a='' b='' mkfunc='getfilevar'
412
	a="$(getfilevar VERSION ${KERNEL_MAKEFILE})"
413
	b="$(getfilevar_noexec VERSION ${KERNEL_MAKEFILE})"
414
	[[ "${a}" != "${b}" ]] && mkfunc='getfilevar_noexec'
415
	echo "${mkfunc}"
416
}
417
418
# internal variable, so we know to only print the warning once
403
# internal variable, so we know to only print the warning once
419
get_version_warning_done=
404
get_version_warning_done=
420
405
Lines 493-506 Link Here
493
	# keep track of it
478
	# keep track of it
494
	KERNEL_MAKEFILE="${KV_DIR}/Makefile"
479
	KERNEL_MAKEFILE="${KV_DIR}/Makefile"
495
480
496
	if [[ -z ${OUTPUT_DIR} ]]; then
497
		# Decide the function used to extract makefile variables.
498
		local mkfunc=$(get_makefile_extract_function "${KERNEL_MAKEFILE}")
499
500
		# And if we didn't pass it, we can take a nosey in the Makefile.
501
		OUTPUT_DIR=$(${mkfunc} KBUILD_OUTPUT "${KERNEL_MAKEFILE}")
502
	fi
503
504
	# And contrary to existing functions I feel we shouldn't trust the
481
	# And contrary to existing functions I feel we shouldn't trust the
505
	# directory name to find version information as this seems insane.
482
	# directory name to find version information as this seems insane.
506
	# So we parse ${KERNEL_MAKEFILE}.  We should be able to trust that
483
	# So we parse ${KERNEL_MAKEFILE}.  We should be able to trust that

Return to bug 469210