From patchwork Mon Feb 4 09:27:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel,1/1] perforce.py: fix the perforce fetcher Date: Mon, 04 Feb 2013 09:27:47 -0000 From: Robert Yang X-Patchwork-Id: 43949 Message-Id: <9d21459877d1d94bdaff1cbe8ca4dd84f5f692fd.1359948771.git.liezhi.yang@windriver.com> To: Cc: Zhenfeng.Zhao@windriver.com The bb.process.run() will return one tuple, e.g: p4file = ('strA\nStrB\nstrC\n'), then there will be an iteration on p4file: for i in p4file: [snip] The i will be 's t r A ...', this is incorrect. use: p4file = p4file.splitlines() will fix the problem. [YOCTO #3619] Signed-off-by: Robert Yang --- bitbake/lib/bb/fetch2/perforce.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py index df3a3a3..86ec9ba 100644 --- a/bitbake/lib/bb/fetch2/perforce.py +++ b/bitbake/lib/bb/fetch2/perforce.py @@ -170,7 +170,7 @@ class Perforce(FetchMethod): logger.info("Fetch " + loc) logger.info("%s%s files %s", p4cmd, p4opt, depot) p4file, errors = bb.process.run("%s%s files %s" % (p4cmd, p4opt, depot)) - p4file = p4file.strip() + p4file = p4file.splitlines() if not p4file: raise FetchError("Fetch: unable to get the P4 files from %s" % depot, loc)