Moving get_version to linux-info pkg_setup and calling from linux-mod pkg_setup when...
authorJohn Mylchreest <johnm@gentoo.org>
Mon, 6 Dec 2004 18:33:11 +0000 (18:33 +0000)
committerJohn Mylchreest <johnm@gentoo.org>
Mon, 6 Dec 2004 18:33:11 +0000 (18:33 +0000)
eclass/linux-info.eclass
eclass/linux-mod.eclass

index 5b9258e144a8791d1cfb9184e05f4b177789b5df..09a473f2ebb040513efae8347a4d4ad89741d8da 100644 (file)
@@ -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-info.eclass,v 1.7 2004/12/05 12:46:58 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.8 2004/12/06 18:33:10 johnm Exp $
 #
 # This eclass provides functions for querying the installed kernel
 # source version, selected kernel options etc.
@@ -8,6 +8,7 @@
 
 ECLASS=linux-info
 INHERITED="$INHERITED $ECLASS"
+EXPORT_FUNCTIONS pkg_setup
 
 # Overwritable environment Var's
 # ---------------------------------------
@@ -380,3 +381,11 @@ local      DEFLATE
 
        die "Kernel doesn't include zlib support"
 }
+
+################################
+# Default pkg_setup
+# Also used when inheriting linux-mod to force a get_version call
+
+linux-info_pkg_setup() {
+       get_version;
+}
index 212a5b2a90056303194a9bff801bf172720a8368..83b1a9cd537a178e85203794c1c286116fa44e2a 100644 (file)
@@ -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.5 2004/11/28 09:47:31 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.6 2004/12/06 18:33:11 johnm Exp $
 
 # This eclass provides functions for compiling external kernel modules
 # from source.
@@ -108,8 +108,8 @@ display_postinst() {
 # --------------------------------
 
 linux-mod_pkg_setup() {
-       get_version;
-       check_kernel_built
+       linux-info_pkg_setup;
+       check_kernel_built;
        check_modules_supported;
        check_extra_config;
        set_kvobj;