summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/bzr.py
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-01-24 15:56:54 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-25 12:32:50 +0000
commit029f8584d547c0792ffbe2f83451dcdfe2a3db7f (patch)
treef5d680b8b72371b1039d5aff6fac1b28eb9d530f /bitbake/lib/bb/fetch2/bzr.py
parent098e8ded339f3bf864f3bad9871028176f70b12b (diff)
downloadpoky-029f8584d547c0792ffbe2f83451dcdfe2a3db7f.tar.gz
bitbake/fetch2: Instrument fetchers when making network access
Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch2/bzr.py')
-rw-r--r--bitbake/lib/bb/fetch2/bzr.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py
index 608ecc7474..6e1970b715 100644
--- a/bitbake/lib/bb/fetch2/bzr.py
+++ b/bitbake/lib/bb/fetch2/bzr.py
@@ -85,11 +85,13 @@ class Bzr(Fetch):
85 if os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK): 85 if os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK):
86 bzrcmd = self._buildbzrcommand(ud, d, "update") 86 bzrcmd = self._buildbzrcommand(ud, d, "update")
87 logger.debug(1, "BZR Update %s", loc) 87 logger.debug(1, "BZR Update %s", loc)
88 bb.fetch2.check_network_access(d, bzrcmd)
88 os.chdir(os.path.join (ud.pkgdir, os.path.basename(ud.path))) 89 os.chdir(os.path.join (ud.pkgdir, os.path.basename(ud.path)))
89 runfetchcmd(bzrcmd, d) 90 runfetchcmd(bzrcmd, d)
90 else: 91 else:
91 bb.utils.remove(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir)), True) 92 bb.utils.remove(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir)), True)
92 bzrcmd = self._buildbzrcommand(ud, d, "fetch") 93 bzrcmd = self._buildbzrcommand(ud, d, "fetch")
94 bb.fetch2.check_network_access(d, bzrcmd)
93 logger.debug(1, "BZR Checkout %s", loc) 95 logger.debug(1, "BZR Checkout %s", loc)
94 bb.mkdirhier(ud.pkgdir) 96 bb.mkdirhier(ud.pkgdir)
95 os.chdir(ud.pkgdir) 97 os.chdir(ud.pkgdir)
@@ -130,6 +132,8 @@ class Bzr(Fetch):
130 """ 132 """
131 logger.debug(2, "BZR fetcher hitting network for %s", url) 133 logger.debug(2, "BZR fetcher hitting network for %s", url)
132 134
135 bb.fetch2.check_network_access(d, self._buildbzrcommand(ud, d, "revno"))
136
133 output = runfetchcmd(self._buildbzrcommand(ud, d, "revno"), d, True) 137 output = runfetchcmd(self._buildbzrcommand(ud, d, "revno"), d, True)
134 138
135 return output.strip() 139 return output.strip()