Bug 3619

Summary: Perforce fetch is broken
Product: [Build System, Metadata & Runtime] BitBake Reporter: Levi Pearson <levi.pearson>
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, richard.purdie, sgw, yi.zhao, zhenfeng.zhao
Version: unspecified   
Target Milestone: 1.4 M5   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Levi Pearson 2012-12-19 06:38:28 UTC
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 'for file in p4file:' 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 'for file in p4file.splitlines():' or on an earlier line, 'p4file = p4file.splitlines()'.  I added a change like this and it fixed it for me.
Comment 2 Yi Zhao 2013-03-08 06:39:53 UTC
Verified with master branch: d823759b4594143d522eae0b2a2498436a6dcb1e