summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2013-02-04 03:19:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-25 05:58:20 -0800
commit35ed9790198aab64777194488de2be5c26e23e30 (patch)
tree4617ab6bbdaecee1f154d00cb69d1dc4fc159a3b
parent593ee3698ed1b6925b561f70ba269e345578ff4c (diff)
downloadpoky-35ed9790198aab64777194488de2be5c26e23e30.tar.gz
bitbake: perforce.py: fix the perforce fetcher
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 splitlines() to fix the problem. [YOCTO #3619] (Bitbake rev: b7440fb36b419996046f607e66434ce34722272b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index df3a3a36db..fc4074d5a3 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -170,7 +170,7 @@ class Perforce(FetchMethod):
170 logger.info("Fetch " + loc) 170 logger.info("Fetch " + loc)
171 logger.info("%s%s files %s", p4cmd, p4opt, depot) 171 logger.info("%s%s files %s", p4cmd, p4opt, depot)
172 p4file, errors = bb.process.run("%s%s files %s" % (p4cmd, p4opt, depot)) 172 p4file, errors = bb.process.run("%s%s files %s" % (p4cmd, p4opt, depot))
173 p4file = p4file.strip() 173 p4file = [f.rstrip() for f in p4file.splitlines()]
174 174
175 if not p4file: 175 if not p4file:
176 raise FetchError("Fetch: unable to get the P4 files from %s" % depot, loc) 176 raise FetchError("Fetch: unable to get the P4 files from %s" % depot, loc)