From f0b2620475f161aadd6af20a8110ca29e55e5a03 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sun, 17 Jan 2010 03:54:51 +0000 Subject: Bug #286292: Try to make kernel module binpkgs NOT need kernel sources by using a different path in pkg_setup. --- eclass/linux-mod.eclass | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'eclass') diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index 7c4aa4d25001..bcdde40210b6 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.96 2010/01/10 09:38:50 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.97 2010/01/17 03:54:51 robbat2 Exp $ # Author(s): John Mylchreest , # Stefan Schweizer @@ -576,6 +576,12 @@ find_module_params() { linux-mod_pkg_setup() { debug-print-function ${FUNCNAME} $* + # If we are installing a binpkg, take a different path. + if [[ $EMERGE_FROM == binary ]]; then + linux-mod_pkg_setup_binary + return + fi + linux-info_pkg_setup; require_configured_kernel check_kernel_built; @@ -588,6 +594,22 @@ linux-mod_pkg_setup() { #check_vermagic; } +# @FUNCTION: linux-mod_pkg_setup_binary +# @DESCRIPTION: +# Perform all kernel option checks non-fatally, as the .config and +# /proc/config.gz might not be present. Do not do anything that requires kernel +# sources. +linux-mod_pkg_setup_binary() { + debug-print-function ${FUNCNAME} $* + local new_CONFIG_CHECK + for config in $CONFIG_CHECK ; do + optional=${config:0:1} + new_CONFIG_CHECK="${new_CONFIG_CHECK} ${optional:-~}${config}" + done + export CONFIG_CHECK="${new_CONFIG_CHECK}" + linux-info_pkg_setup; +} + strip_modulenames() { debug-print-function ${FUNCNAME} $* -- cgit v1.2.3-65-gdbad