<?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>2689</bug_id>
          
          <creation_ts>2012-07-04 02:58:20 +0000</creation_ts>
          <short_desc>apt-native 0.7.14: Method file has died unexpectedly when run (tmpdir length)</short_desc>
          <delta_ts>2012-07-19 08:08:47 +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>devtools / tool chain</component>
          <version>1.3</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>(P2) 	(QA Testing Completed)(Done) </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3 M4</target_milestone>
          
          <blocked>2434</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>liang.li2</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>song.liu</cc>
    
    <cc>zhenfeng.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>22771</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-07-04 02:58:20 +0000</bug_when>
    <thetext>When the length of the tmpdir is longer than 400, there is an error when run &quot;apt-get update&quot;:

Method file has died unexpectedly!

This is caused by the following code in apt-pkg/acquire-method.cc:


// AcqMethod::URIStart - Indicate a download is starting                /*{{{*/
// ---------------------------------------------------------------------
/* */
void pkgAcqMethod::URIStart(FetchResult &amp;Res)
{
   if (Queue == 0)
      abort();

   char S[1024] = &quot;&quot;;
   char *End = S;

   End += snprintf(S,sizeof(S),&quot;200 URI Start\nURI: %s\n&quot;,Queue-&gt;Uri.c_str());
   if (Res.Size != 0)
      End += snprintf(End,sizeof(S)-4 - (End - S),&quot;Size: %lu\n&quot;,Res.Size);

   if (Res.LastModified != 0)
      End += snprintf(End,sizeof(S)-4 - (End - S),&quot;Last-Modified: %s\n&quot;,
                      TimeRFC1123(Res.LastModified).c_str());

   if (Res.ResumePoint != 0)
      End += snprintf(End,sizeof(S)-4 - (End - S),&quot;Resume-Point: %lu\n&quot;,
                      Res.ResumePoint);

   strcat(End,&quot;\n&quot;);
   if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S))
      exit(100);
}

The S[1024] is not enough when the tmpdir is very long, assign a bigger value would fix the problem, for example, 2048.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22921</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-07-10 01:55:31 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=12c8d9d4512cd9159ba862a4f7cf8608d4b57e65</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23243</commentid>
    <comment_count>2</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2012-07-19 08:04:24 +0000</bug_when>
    <thetext>the build dir is &quot;/home/yocto/test_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto/test_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto_yocto&quot; ,which length equals 400.
run &quot;bitbake core-image-minimal&quot;, no error during build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23245</commentid>
    <comment_count>3</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2012-07-19 08:08:47 +0000</bug_when>
    <thetext>test env :
host :Fedora 17 x86_64

git info : eb0cb7e8234f5d2e5623406e9660be91cf52f65e
git branch: poky/master</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>