summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/perforce.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-11-21 14:31:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:10 +0000
commit38438b6cf42fb7ad45b9a901f57913af7e7591a3 (patch)
tree1ea9bd4fa7b7b90fb4a0d4a65235e18062ff2872 /bitbake/lib/bb/fetch2/perforce.py
parent4e48892b859b3fe04c8c12b22d8975eed21c086b (diff)
downloadpoky-38438b6cf42fb7ad45b9a901f57913af7e7591a3.tar.gz
bitbake: fetch2: obey BB_ALLOWED_NETWORKS when checking network access
[YOCTO #10508] (Bitbake rev: ddd3bc2d64d7240ecb6b6e4a1ae29b1faef6cc22) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/perforce.py')
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index be73ca0518..0f0d7393c1 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -71,7 +71,7 @@ class Perforce(FetchMethod):
71 logger.debug(1, 'Trying to use P4CONFIG to automatically set P4PORT...') 71 logger.debug(1, 'Trying to use P4CONFIG to automatically set P4PORT...')
72 ud.usingp4config = True 72 ud.usingp4config = True
73 p4cmd = '%s info | grep "Server address"' % ud.basecmd 73 p4cmd = '%s info | grep "Server address"' % ud.basecmd
74 bb.fetch2.check_network_access(d, p4cmd) 74 bb.fetch2.check_network_access(d, p4cmd, ud.url)
75 ud.host = runfetchcmd(p4cmd, d, True) 75 ud.host = runfetchcmd(p4cmd, d, True)
76 ud.host = ud.host.split(': ')[1].strip() 76 ud.host = ud.host.split(': ')[1].strip()
77 logger.debug(1, 'Determined P4PORT to be: %s' % ud.host) 77 logger.debug(1, 'Determined P4PORT to be: %s' % ud.host)
@@ -140,7 +140,7 @@ class Perforce(FetchMethod):
140 'p4 files' command, including trailing '#rev' file revision indicator 140 'p4 files' command, including trailing '#rev' file revision indicator
141 """ 141 """
142 p4cmd = self._buildp4command(ud, d, 'files') 142 p4cmd = self._buildp4command(ud, d, 'files')
143 bb.fetch2.check_network_access(d, p4cmd) 143 bb.fetch2.check_network_access(d, p4cmd, ud.url)
144 p4fileslist = runfetchcmd(p4cmd, d, True) 144 p4fileslist = runfetchcmd(p4cmd, d, True)
145 p4fileslist = [f.rstrip() for f in p4fileslist.splitlines()] 145 p4fileslist = [f.rstrip() for f in p4fileslist.splitlines()]
146 146
@@ -171,7 +171,7 @@ class Perforce(FetchMethod):
171 171
172 for afile in filelist: 172 for afile in filelist:
173 p4fetchcmd = self._buildp4command(ud, d, 'print', afile) 173 p4fetchcmd = self._buildp4command(ud, d, 'print', afile)
174 bb.fetch2.check_network_access(d, p4fetchcmd) 174 bb.fetch2.check_network_access(d, p4fetchcmd, ud.url)
175 runfetchcmd(p4fetchcmd, d, workdir=ud.pkgdir) 175 runfetchcmd(p4fetchcmd, d, workdir=ud.pkgdir)
176 176
177 runfetchcmd('tar -czf %s p4' % (ud.localpath), d, cleanup=[ud.localpath], workdir=ud.pkgdir) 177 runfetchcmd('tar -czf %s p4' % (ud.localpath), d, cleanup=[ud.localpath], workdir=ud.pkgdir)
@@ -191,7 +191,7 @@ class Perforce(FetchMethod):
191 def _latest_revision(self, ud, d, name): 191 def _latest_revision(self, ud, d, name):
192 """ Return the latest upstream scm revision number """ 192 """ Return the latest upstream scm revision number """
193 p4cmd = self._buildp4command(ud, d, "changes") 193 p4cmd = self._buildp4command(ud, d, "changes")
194 bb.fetch2.check_network_access(d, p4cmd) 194 bb.fetch2.check_network_access(d, p4cmd, ud.url)
195 tip = runfetchcmd(p4cmd, d, True) 195 tip = runfetchcmd(p4cmd, d, True)
196 196
197 if not tip: 197 if not tip: