Patchwork [v2] {kernel, module}.bbclass: don't run depmod for module packages during do_rootfs

login
register
mail settings
Submitter Andreas Oberritter
Date March 23, 2012, 8:06 p.m.
Message ID <1332533179-22144-1-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/24351/
State Accepted
Commit c7809c03080925b5e9171df5c9175c7c6420b376
Headers show

Comments

Andreas Oberritter - March 23, 2012, 8:06 p.m.
* depmod already gets executed by pkg_postinst_kernel-image.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
* v2: Instead of adding a call to depmod to module.bbclass,
      just do nothing.

 meta/classes/kernel.bbclass |    4 +---
 meta/classes/module.bbclass |    7 +++----
 2 files changed, 4 insertions(+), 7 deletions(-)

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 169df33..0f86ee8 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -268,9 +268,7 @@  fi
 }
 
 pkg_postinst_modules () {
-if [ -n "$D" ]; then
-	${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
-else
+if [ -z "$D" ]; then
 	depmod -a
 	update-modules || true
 fi
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 53c16b7..91628e4 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -37,15 +37,14 @@  module_do_install() {
 }
 
 pkg_postinst_append () {
-	if [ -n "$D" ]; then
-		exit 1
-	fi
+if [ -z "$D" ]; then
 	depmod -a
 	update-modules || true
+fi
 }
 
 pkg_postrm_append () {
-	update-modules || true
+update-modules || true
 }
 
 EXPORT_FUNCTIONS do_compile do_install