update-modules is obsolete. The bbclass was updated not to use it
anymore.
[YOCTO #3598]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-RDEPENDS_${PN} += "kernel-image ${@oe.utils.contains('DISTRO_FEATURES', 'update-modules', 'update-modules', '', d)}"
+RDEPENDS_${PN} += "kernel-image"
 DEPENDS += "virtual/kernel"
 
 inherit module-base
 
 pkg_postinst_append () {
 if [ -z "$D" ]; then
-       depmod -a
-       update-modules || true
+       depmod -a ${KERNEL_VERSION}
+else
+       depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
 fi
 }
 
 pkg_postrm_append () {
-update-modules || true
+if [ -z "$D" ]; then
+       depmod -a ${KERNEL_VERSION}
+else
+       depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
+fi
 }
 
 EXPORT_FUNCTIONS do_compile do_install