<?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>818</bug_id>
          
          <creation_ts>2011-03-08 00:18:34 +0000</creation_ts>
          <short_desc>opkg defects: when opkg from remote site, it will easily fails with md5 err</short_desc>
          <delta_ts>2011-03-10 22:15:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>ADT</product>
          <component>adt</component>
          <version>1.0</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>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.0 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="liping Ke">liping.ke</reporter>
          <assigned_to name="liping Ke">liping.ke</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>lianhao.lu</cc>
    
    <cc>liping.ke</cc>
    
    <cc>poky.adt.watcher</cc>
    
    <cc>poky.watcher</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>12353</commentid>
    <comment_count>0</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-08 00:18:34 +0000</bug_when>
    <thetext>When opkg update and install from a remote URI, if the network is not fast enough, it will meet md5sum chkerror easily, something like below:
opkg_install_pkg: Package XXX md5sum mismatch. Either the opkg or the package index are corrupt. Try &apos;opkg update&apos;
opkg_install_cmd: Cannot install package XXX

I found for increasing success chance, (we here always fail), for installing each package, 
firstly add 
1) opkg update (update each time)

2) then opkg install 

3) sleep 3 (3 seconds are best)


then begin another round for installing another package.

Even so I still fail, for example, when installing qemu-native,
it will automatically install many other packages, it will easily fail for the same reason. I  guess if I add update/sleep, it will also fail.

So I guess opkg source code must have some defects (synchronization problem wget download problem or else). It must be fixed first.

This is a high priority bug.

criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12354</commentid>
    <comment_count>1</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-08 00:30:27 +0000</bug_when>
    <thetext>If I have a machine in the internal lab, which means has another layer of network gate, the speed is slower, the failure rate will be higher accordingly.
Even with above work-round, I still have rare success chances.


criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12358</commentid>
    <comment_count>2</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-08 01:28:24 +0000</bug_when>
    <thetext>I verified in opkg source code, 
for wget, add some options such as -v -tries will help a lot.

I guess this is something with poky fetch with wget often unpack fails

So after we add appropriate wget options, make sure it will not download damaged file, the problem should be fixed.

criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12379</commentid>
    <comment_count>3</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-08 18:02:49 +0000</bug_when>
    <thetext>It&apos;s obvious a opkg bug. Using wget style for opkg doesn&apos;t work well when network condition is not very good. It&apos;s partly because wget itself is not that perfect especially when -q option.

If we switch to curl instead of wget, it&apos;s a little better, but still, we might meet the same problem.


criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12413</commentid>
    <comment_count>4</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-09 17:22:01 +0000</bug_when>
    <thetext>After more investigation, it might be our proxy server problem.

We have two repos under different folders. And the proxy server often provides something in the cache. So it mixed up the contents of the two repos. 

Everything is just messed up.

We&apos;ll first delete one repo to see how proxy server works.

Jessica gave info that visiting outside intel network, everything is just fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12442</commentid>
    <comment_count>5</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-10 00:17:07 +0000</bug_when>
    <thetext>After we checking the opkg code, wget code should be just correct.

Then it should be our proxy server cache problem. Since our filename and path are too long. and the different repo&apos;s path and name are very much similar. It makes our proxy server cache-hit algorithm perplexed.

After adding --no-cache in wget to disable all server side cache, the problem should be fixed.

criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12489</commentid>
    <comment_count>6</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-10 22:14:18 +0000</bug_when>
    <thetext>This problem has been fixed by http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=f776bc667eb99bf554f433d75a381ebbb1ddb618


We solve the proxy issue by disable all wget server side proxy.

criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12490</commentid>
    <comment_count>7</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2011-03-10 22:15:46 +0000</bug_when>
    <thetext>change bug status</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>