From: Robert Yang Date: Mon, 4 Feb 2013 03:19:36 +0000 (+0000) Subject: bitbake: perforce.py: fix the perforce fetcher X-Git-Tag: rev_ivi_2015_02_04~13592 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1067a20cd3cc567f70b4523a4a6cd0d9b5e2e85;p=scm%2Fbb%2Ftizen-distro.git 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 Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py index df3a3a3..fc4074d 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 = [f.rstrip() for f in p4file.splitlines()] if not p4file: raise FetchError("Fetch: unable to get the P4 files from %s" % depot, loc)