<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4595</bug_id>
          
          <creation_ts>2013-06-03 09:11:18 +0000</creation_ts>
          <short_desc>Invalid symbolic link file modules-arch.tgz in tmp/deploy/images directory</short_desc>
          <delta_ts>2013-06-09 09:01:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>deployment</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Yi Zhao">yi.zhao</assigned_to>
          <cc>ke.zou</cc>
    
    <cc>ning.zhang</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>33491</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-06-03 09:11:18 +0000</bug_when>
    <thetext>Branch: master
Git rev: 676fd3f394a0c0576b63c77ed2184bf5f42c29b6

When build an image, It will generate a symbolic link file named modules-arch.tgz in tmp/deploy/images directory. This file should link to the real modules tarball. But now it links to an invalid file. 

For example, If I build a qemux86-64 image and check the modules-qemux86-64.tgz: 
############
$ ls -l tmp/deploy/images/modules-*

-rw-rw-r--. 2 build build 32903617 May 29 20:13 tmp/deploy/images/modules--3.8.11+git8482dcdf68_0+dd089cb5ba-r4.1-qemux86-64-20130529090849.tgz

lrwxrwxrwx. 2 build build       81 May 29 20:13 tmp/deploy/images/modules-qemux86-64.tgz -&gt; modules--3.8.11+git8482dcdf68_0+dd089cb5ba-r4.1-qemux86-64-20130529090849.tgz.bin
###########

The symbolic link file links to an invalid file which has an extra &quot;.bin&quot; suffix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33511</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-06-03 16:10:12 +0000</bug_when>
    <thetext>kernel.bbclass:

MODULE_TARBALL_BASE_NAME ?= &quot;${MODULE_IMAGE_BASE_NAME}.tgz&quot;
...
MODULE_TARBALL_SYMLINK_NAME ?= &quot;modules-${MACHINE}.tgz&quot;
...
kernel_do_deploy() {
	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
	if [ ${MODULE_TARBALL_DEPLOY} = &quot;1&quot; ] &amp;&amp; (grep -q -i -e &apos;^CONFIG_MODULES=y$&apos; .config); then
		mkdir -p ${D}/lib
		tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
		ln -sf ${MODULE_TARBALL_BASE_NAME}.bin ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
	fi

The .bin suffix is clearly added here, but I&apos;m not sure why. There is a lot of .bin throughout the code, I suspect something rooted in the history of the class/project. If you change just this one line above to not use .bin, does it work correctly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33534</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-06-04 08:10:58 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; kernel.bbclass:
&gt; 
&gt; MODULE_TARBALL_BASE_NAME ?= &quot;${MODULE_IMAGE_BASE_NAME}.tgz&quot;
&gt; ...
&gt; MODULE_TARBALL_SYMLINK_NAME ?= &quot;modules-${MACHINE}.tgz&quot;
&gt; ...
&gt; kernel_do_deploy() {
&gt; 	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
&gt; 	if [ ${MODULE_TARBALL_DEPLOY} = &quot;1&quot; ] &amp;&amp; (grep -q -i -e
&gt; &apos;^CONFIG_MODULES=y$&apos; .config); then
&gt; 		mkdir -p ${D}/lib
&gt; 		tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
&gt; 		ln -sf ${MODULE_TARBALL_BASE_NAME}.bin
&gt; ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
&gt; 	fi
&gt; 
&gt; The .bin suffix is clearly added here, but I&apos;m not sure why. There is a lot
&gt; of .bin throughout the code, I suspect something rooted in the history of
&gt; the class/project. If you change just this one line above to not use .bin,
&gt; does it work correctly?

Yes, it works correctly. I think it is the right way to fix this issue. I will do more testing and send a patch later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33720</commentid>
    <comment_count>3</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-06-09 09:01:09 +0000</bug_when>
    <thetext>Merge into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=dfd0985065c3447df169198e8cd518e007f630ff</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>