<?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>3619</bug_id>
          
          <creation_ts>2012-12-19 06:38:28 +0000</creation_ts>
          <short_desc>Perforce fetch is broken</short_desc>
          <delta_ts>2013-03-08 06:39:53 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>All</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>1.4 M5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Levi Pearson">levi.pearson</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</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>28368</commentid>
    <comment_count>0</comment_count>
    <who name="Levi Pearson">levi.pearson</who>
    <bug_when>2012-12-19 06:38:28 +0000</bug_when>
    <thetext>The breaking change is here: http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/fetch2/perforce.py?id=094742bed2fc01d55f572da946fcfa7a48521401

The author of the patch misunderstood the code; the split() was not intended to break the file stream into lines; it was intended to split a single line at whitespace for some p4-specific formatting. 

The &apos;for file in p4file:&apos; line is what split the stream into lines, since iterating over a file handle yields lines, but now it is broken due to operating on a string instead of a file stream handle.

A possible fix would be something to the effect of &apos;for file in p4file.splitlines():&apos; or on an earlier line, &apos;p4file = p4file.splitlines()&apos;.  I added a change like this and it fixed it for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30076</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-02-25 14:37:56 +0000</bug_when>
    <thetext>Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=35ed9790198aab64777194488de2be5c26e23e30</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30560</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-03-08 06:39:53 +0000</bug_when>
    <thetext>Verified with master branch: d823759b4594143d522eae0b2a2498436a6dcb1e</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>