summaryrefslogtreecommitdiffstats
path: root/lib
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:57:42 -0800
commitb7440fb36b419996046f607e66434ce34722272b (patch)
tree18253677d5a6f90d698e04ffd44290c61b908b64 /lib
parente6db0ee31178d4386802e720d75303ec7dc21519 (diff)
downloadbitbake-b7440fb36b419996046f607e66434ce34722272b.tar.gz
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/fetch2/perforce.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/perforce.py b/lib/bb/fetch2/perforce.py
index df3a3a36d..fc4074d5a 100644
--- a/lib/bb/fetch2/perforce.py
+++ b/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 = [f.rstrip() for f in p4file.splitlines()]
if not p4file:
raise FetchError("Fetch: unable to get the P4 files from %s" % depot, loc)