diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/perforce.py | 11 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch2/svk.py | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py index 6abf15d65a..df3a3a36db 100644 --- a/bitbake/lib/bb/fetch2/perforce.py +++ b/bitbake/lib/bb/fetch2/perforce.py | |||
@@ -91,8 +91,8 @@ class Perforce(FetchMethod): | |||
91 | 91 | ||
92 | p4cmd = data.getVar('FETCHCOMMAND_p4', d, True) | 92 | p4cmd = data.getVar('FETCHCOMMAND_p4', d, True) |
93 | logger.debug(1, "Running %s%s changes -m 1 %s", p4cmd, p4opt, depot) | 93 | logger.debug(1, "Running %s%s changes -m 1 %s", p4cmd, p4opt, depot) |
94 | p4file = os.popen("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot)) | 94 | p4file, errors = bb.process.run("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot)) |
95 | cset = p4file.readline().strip() | 95 | cset = p4file.strip() |
96 | logger.debug(1, "READ %s", cset) | 96 | logger.debug(1, "READ %s", cset) |
97 | if not cset: | 97 | if not cset: |
98 | return -1 | 98 | return -1 |
@@ -155,8 +155,8 @@ class Perforce(FetchMethod): | |||
155 | logger.debug(2, "Fetch: creating temporary directory") | 155 | logger.debug(2, "Fetch: creating temporary directory") |
156 | bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata)) | 156 | bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata)) |
157 | data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata) | 157 | data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata) |
158 | tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, True) or "false") | 158 | tmpfile, errors = bb.process.run(data.getVar('MKTEMPDIRCMD', localdata, True) or "false") |
159 | tmpfile = tmppipe.readline().strip() | 159 | tmpfile = tmpfile.strip() |
160 | if not tmpfile: | 160 | if not tmpfile: |
161 | raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", loc) | 161 | raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", loc) |
162 | 162 | ||
@@ -169,7 +169,8 @@ class Perforce(FetchMethod): | |||
169 | os.chdir(tmpfile) | 169 | os.chdir(tmpfile) |
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 = os.popen("%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 | 174 | ||
174 | if not p4file: | 175 | if not p4file: |
175 | 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) |
diff --git a/bitbake/lib/bb/fetch2/svk.py b/bitbake/lib/bb/fetch2/svk.py index 9d34abf3da..ee3823f845 100644 --- a/bitbake/lib/bb/fetch2/svk.py +++ b/bitbake/lib/bb/fetch2/svk.py | |||
@@ -77,8 +77,8 @@ class Svk(FetchMethod): | |||
77 | logger.debug(2, "Fetch: creating temporary directory") | 77 | logger.debug(2, "Fetch: creating temporary directory") |
78 | bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata)) | 78 | bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata)) |
79 | data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata) | 79 | data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata) |
80 | tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, True) or "false") | 80 | tmpfile, errors = bb.process.run(data.getVar('MKTEMPDIRCMD', localdata, True) or "false") |
81 | tmpfile = tmppipe.readline().strip() | 81 | tmpfile = tmpfile.strip() |
82 | if not tmpfile: | 82 | if not tmpfile: |
83 | logger.error() | 83 | logger.error() |
84 | raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", loc) | 84 | raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", loc) |