<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 17, 2013 at 9:58 AM, Laurentiu Palcu <span dir="ltr">&lt;<a href="mailto:laurentiu.palcu@intel.com" target="_blank">laurentiu.palcu@intel.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since update-modules is now obsolete, remove it from the bbclass.<br>
<br></blockquote><div><br></div><div style>This seems to capture all the concerns that I had about removing update-modules.</div><div style><br></div><div style>Acked-by: Bruce Ashfield &lt;<a href="mailto:bruce.ashfield@windriver.com">bruce.ashfield@windriver.com</a>&gt;</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[YOCTO #3598]<br>
<br>
Signed-off-by: Laurentiu Palcu &lt;<a href="mailto:laurentiu.palcu@intel.com">laurentiu.palcu@intel.com</a>&gt;<br>
---<br>
 meta/classes/kernel.bbclass |   36 +++++++++++++++++-------------------<br>
 1 file changed, 17 insertions(+), 19 deletions(-)<br>
<br>
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass<br>
index 46ba55f..4893cf2 100644<br>
--- a/meta/classes/kernel.bbclass<br>
+++ b/meta/classes/kernel.bbclass<br>
@@ -1,7 +1,7 @@<br>
 inherit linux-kernel-base module_strip<br>
<br>
 PROVIDES += &quot;virtual/kernel&quot;<br>
-DEPENDS += &quot;virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules&quot;<br>
+DEPENDS += &quot;virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}&quot;<br>
<br>
 # we include gcc above, we dont need virtual/libc<br>
 INHIBIT_DEFAULT_DEPS = &quot;1&quot;<br>
@@ -293,12 +293,17 @@ fi<br>
 pkg_postinst_modules () {<br>
 if [ -z &quot;$D&quot; ]; then<br>
        depmod -a ${KERNEL_VERSION}<br>
-       update-modules || true<br>
+else<br>
+       depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}<br>
 fi<br>
 }<br>
<br>
 pkg_postrm_modules () {<br>
-update-modules || true<br>
+if [ -z &quot;$D&quot; ]; then<br>
+       depmod -a ${KERNEL_VERSION}<br>
+else<br>
+       depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}<br>
+fi<br>
 }<br>
<br>
 autoload_postinst_fragment() {<br>
@@ -403,12 +408,10 @@ python populate_packages_prepend () {<br>
<br>
         dvar = d.getVar(&#39;PKGD&#39;, True)<br>
<br>
-        use_update_modules = oe.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;update-modules&#39;, True, False, d)<br>
-<br>
         # If autoloading is requested, output /etc/modules-load.d/&lt;name&gt;.conf and append<br>
         # appropriate modprobe commands to the postinst<br>
         autoload = d.getVar(&#39;module_autoload_%s&#39; % basename, True)<br>
-        if autoload and use_update_modules:<br>
+        if autoload:<br>
             name = &#39;%s/etc/modules-load.d/%s.conf&#39; % (dvar, basename)<br>
             f = open(name, &#39;w&#39;)<br>
             for m in autoload.split():<br>
@@ -422,16 +425,15 @@ python populate_packages_prepend () {<br>
<br>
         # Write out any modconf fragment<br>
         modconf = d.getVar(&#39;module_conf_%s&#39; % basename, True)<br>
-        if modconf and use_update_modules:<br>
+        if modconf:<br>
             name = &#39;%s/etc/modprobe.d/%s.conf&#39; % (dvar, basename)<br>
             f = open(name, &#39;w&#39;)<br>
             f.write(&quot;%s\n&quot; % modconf)<br>
             f.close()<br>
<br>
-        if use_update_modules:<br>
-            files = d.getVar(&#39;FILES_%s&#39; % pkg, True)<br>
-            files = &quot;%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf&quot; % (files, basename, basename)<br>
-            d.setVar(&#39;FILES_%s&#39; % pkg, files)<br>
+        files = d.getVar(&#39;FILES_%s&#39; % pkg, True)<br>
+        files = &quot;%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf&quot; % (files, basename, basename)<br>
+        d.setVar(&#39;FILES_%s&#39; % pkg, files)<br>
<br>
         if vals.has_key(&quot;description&quot;):<br>
             old_desc = d.getVar(&#39;DESCRIPTION_&#39; + pkg, True) or &quot;&quot;<br>
@@ -447,17 +449,13 @@ python populate_packages_prepend () {<br>
     module_regex = &#39;^(.*)\.k?o$&#39;<br>
     module_pattern = &#39;kernel-module-%s&#39;<br>
<br>
-    use_update_modules = oe.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;update-modules&#39;, True, False, d)<br>
-    if use_update_modules:<br>
-        postinst = d.getVar(&#39;pkg_postinst_modules&#39;, True)<br>
-        postrm = d.getVar(&#39;pkg_postrm_modules&#39;, True)<br>
-    else:<br>
-        postinst = None<br>
-        postrm = None<br>
+    postinst = d.getVar(&#39;pkg_postinst_modules&#39;, True)<br>
+    postrm = d.getVar(&#39;pkg_postrm_modules&#39;, True)<br>
+<br>
     do_split_packages(d, root=&#39;/lib/firmware&#39;, file_regex=&#39;^(.*)\.bin$&#39;, output_pattern=&#39;kernel-firmware-%s&#39;, description=&#39;Firmware for %s&#39;, recursive=True, extra_depends=&#39;&#39;)<br>
     do_split_packages(d, root=&#39;/lib/firmware&#39;, file_regex=&#39;^(.*)\.fw$&#39;, output_pattern=&#39;kernel-firmware-%s&#39;, description=&#39;Firmware for %s&#39;, recursive=True, extra_depends=&#39;&#39;)<br>
     do_split_packages(d, root=&#39;/lib/firmware&#39;, file_regex=&#39;^(.*)\.cis$&#39;, output_pattern=&#39;kernel-firmware-%s&#39;, description=&#39;Firmware for %s&#39;, recursive=True, extra_depends=&#39;&#39;)<br>
-    do_split_packages(d, root=&#39;/lib/modules&#39;, file_regex=module_regex, output_pattern=module_pattern, description=&#39;%s kernel module&#39;, postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends=&#39;%skernel-%s&#39; % ([&#39;&#39;, &#39;update-modules &#39;][use_update_modules], d.getVar(&quot;KERNEL_VERSION&quot;, True)))<br>

+    do_split_packages(d, root=&#39;/lib/modules&#39;, file_regex=module_regex, output_pattern=module_pattern, description=&#39;%s kernel module&#39;, postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends=&#39;kernel-%s&#39; % (d.getVar(&quot;KERNEL_VERSION&quot;, True)))<br>

<br>
     # If modules-load.d and modprobe.d are empty at this point, remove them to<br>
     # avoid warnings. removedirs only raises an OSError if an empty<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>&quot;Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end&quot;
</div></div>