<?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>6966</bug_id>
          
          <creation_ts>2014-11-13 20:44:09 +0000</creation_ts>
          <short_desc>Ipk-based images contain unusued build process feed info on /var/lib/opkg/lists</short_desc>
          <delta_ts>2016-03-22 12:36:16 +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>core</component>
          <version>1.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.1 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alejandro del Castillo">alejandro.delcastillo</reporter>
          <assigned_to name="Alejandro del Castillo">alejandro.delcastillo</assigned_to>
          <cc>alejandro.hernandez</cc>
    
    <cc>benjamin.esquivel</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>eric</cc>
    
    <cc>jose.a.lamego</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47005</commentid>
    <comment_count>0</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2014-11-13 20:44:09 +0000</bug_when>
    <thetext>I noticed that the OE build process is leaving files at /var/lib/opkg/lists (~1.5 MB on my system), which I believe are the feed content used to build the image. The target opkg.conf file configure lists_dir to be at /var/lib/opkg (instead of the default /var/lib/opkg/lists), so the feed content under /var/lib/opkg/lists is not used at all. 

Commit d950ef40a3eae4b54cc62828e66d84a62d78c447 removed:

rm -f ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/lists/*

step which was not implemented on rootfs.py.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51656</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-06-11 21:46:05 +0000</bug_when>
    <thetext>I am not able to reproduce this, /var/lib/opkg/lists does in fact exist, but it seems to be empty in my builds, is there anything else on your configuration that might be affecting this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52262</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2015-07-09 20:40:06 +0000</bug_when>
    <thetext>You are right, the folder is incorrectly left-over, but it is empty (I must have been running another test, which filled it).

From what I can tell, opkg default lists_dir folder is /var/lib/opkg/lists, which is created during opkg update if it doesn&apos;t exists. If the conf file /etc/opkg/opkg.conf doesn&apos;t have a lists_dir entry, then it goes with the default. I think that&apos;s what happens during the offline root image creation.

The inconsistency comes from the fact that the opkg-collateral recipes defaults lists_dir to /var/lib/opkg:

echo &quot;lists_dir ext ${OPKGLIBDIR}/opkg&quot; &gt;&gt;${WORKDIR}/opkg.conf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52319</commentid>
    <comment_count>3</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2015-07-13 20:04:03 +0000</bug_when>
    <thetext>It appears the NEEDINFO has been completed.   Please put this back in NEEDINFO if there are still questions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52359</commentid>
    <comment_count>4</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-07-14 18:05:58 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; You are right, the folder is incorrectly left-over, but it is empty (I must
&gt; have been running another test, which filled it).
&gt; 
&gt; From what I can tell, opkg default lists_dir folder is /var/lib/opkg/lists,
&gt; which is created during opkg update if it doesn&apos;t exists. If the conf file
&gt; /etc/opkg/opkg.conf doesn&apos;t have a lists_dir entry, then it goes with the
&gt; default. I think that&apos;s what happens during the offline root image creation.
&gt; 
&gt; The inconsistency comes from the fact that the opkg-collateral recipes
&gt; defaults lists_dir to /var/lib/opkg:
&gt; 
&gt; echo &quot;lists_dir ext ${OPKGLIBDIR}/opkg&quot; &gt;&gt;${WORKDIR}/opkg.conf

Ok, we should probably solve inconsistencies by using /var/lib/opkg/lists, but I still need to check, because this &quot;default&quot; behavior might be caused by the line EXTRA_OE_CONF = &quot;--with-opkglibdir=${OPKGLIBDIR}&quot; in our recipe, which according to opkg&apos;s git repository, that option was replaced since opkg v0.3.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52756</commentid>
    <comment_count>5</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-07-31 18:48:35 +0000</bug_when>
    <thetext>Well... for starters were barely on opkg v0.2.4, secondly about some of the comments before, depending on how we&apos;re adding package management to the image we get two different behaviors, if we do it via an IMAGE_FEATURE the lists are populated, hence the extra 1.5MB mentioned before, but if we do it via installing the opkg package, then the list aren&apos;t populated initially, this is apparently desired behavior so we should leave it to the user to decide which behavior is more accurate for a specific applciation.

In any way, inconsistencies should be resolved by using the same lists directory which will end up being &quot;/var/lib/opkg/lists&quot;, sending patch to list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52789</commentid>
    <comment_count>6</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-08-03 15:56:16 +0000</bug_when>
    <thetext>Fixed:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e87b533b2f773ac00bf0acf2ba44c5c98235a383</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55496</commentid>
    <comment_count>7</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-10-20 13:12:36 +0000</bug_when>
    <thetext>Verified on master e35c404537db0b46047fcb2ee7d3645e3e0935c5
Directory is updated after: opkg update with correct information.


Still the original information is NOT correct: oe, oe-all, oe-i586 and oe-qemux86 are pointing to some directories that were on the system where qemu image was built!    

root@qemux86:/var/lib/opkg/lists# ls -ila
   2338 drwxr-xr-x    2 root     root          1024 Oct 20 12:36 .
    833 drwxr-xr-x    4 root     root          1024 Oct 20 11:29 ..
   9442 -rw-r--r--    1 root     root         37868 Oct 20 13:01 all
   9446 -rw-r--r--    1 root     root       6032588 Oct 20 13:01 i586
   2339 lrwxrwxrwx    1 root     root            59 Oct 20 12:16 oe -&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/Packages
   2340 lrwxrwxrwx    1 root     root            63 Oct 20 12:16 oe-all -&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/all/Packages
   2341 lrwxrwxrwx    1 root     root            64 Oct 20 12:16 oe-i586 -&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/i586/Packages
   2342 lrwxrwxrwx    1 root     root            67 Oct 20 12:16 oe-qemux86 -&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/qemux86/Packages
   9444 -rw-r--r--    1 root     root        332247 Oct 20 13:01 qemux86

Observe 
root@qemux86:/var/lib/opkg/lists# ls oe-i586
ls: oe-i586: No such file or directory</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56640</commentid>
    <comment_count>8</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2015-11-19 15:55:41 +0000</bug_when>
    <thetext>This was REOPENED</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58847</commentid>
    <comment_count>9</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2016-02-10 18:36:21 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; Verified on master e35c404537db0b46047fcb2ee7d3645e3e0935c5
&gt; Directory is updated after: opkg update with correct information.
&gt; 
&gt; 
&gt; Still the original information is NOT correct: oe, oe-all, oe-i586 and
&gt; oe-qemux86 are pointing to some directories that were on the system where
&gt; qemu image was built!    
&gt; 
&gt; root@qemux86:/var/lib/opkg/lists# ls -ila
&gt;    2338 drwxr-xr-x    2 root     root          1024 Oct 20 12:36 .
&gt;     833 drwxr-xr-x    4 root     root          1024 Oct 20 11:29 ..
&gt;    9442 -rw-r--r--    1 root     root         37868 Oct 20 13:01 all
&gt;    9446 -rw-r--r--    1 root     root       6032588 Oct 20 13:01 i586
&gt;    2339 lrwxrwxrwx    1 root     root            59 Oct 20 12:16 oe -&gt;
&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/Packages
&gt;    2340 lrwxrwxrwx    1 root     root            63 Oct 20 12:16 oe-all -&gt;
&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/all/Packages
&gt;    2341 lrwxrwxrwx    1 root     root            64 Oct 20 12:16 oe-i586 -&gt;
&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/i586/Packages
&gt;    2342 lrwxrwxrwx    1 root     root            67 Oct 20 12:16 oe-qemux86
&gt; -&gt; /home/yocto/yocto/BBB/Bug8048/build/tmp/deploy/ipk/qemux86/Packages
&gt;    9444 -rw-r--r--    1 root     root        332247 Oct 20 13:01 qemux86
&gt; 
&gt; Observe 
&gt; root@qemux86:/var/lib/opkg/lists# ls oe-i586
&gt; ls: oe-i586: No such file or directory

Again, I am not able to reproduce this, I tried both methods (including opkg on the image, and also via IMAGE_FEATURES, to me the &quot;lists&quot; doesn&apos;t exist, it is created after running opkg update, but still after it&apos;s empty:

root@qemux86:/var/lib/opkg# ls
root@qemux86:/var/lib/opkg# opkg update
root@qemux86:/var/lib/opkg# ls
info  lists
root@qemux86:/var/lib/opkg# cd lists/
root@qemux86:/var/lib/opkg/lists# ls -l
total 0

Could this be happening because of another test you are running?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60281</commentid>
    <comment_count>10</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-03-22 12:35:51 +0000</bug_when>
    <thetext>Looks ok now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60282</commentid>
    <comment_count>11</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-03-22 12:36:16 +0000</bug_when>
    <thetext>Verified on master 8037ba4d86a65ee296cfdcee736dfd614c568818</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>