summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-08-27 15:52:08 +0100
committerJoshua Lock <josh@linux.intel.com>2010-09-01 11:14:57 +0100
commit232ef8430e2cfbf6eee54f602dc74b9986e3997f (patch)
tree469e11c3fdc5e8beb9b8ded9bce0ec53c5ba3af5 /bitbake/lib
parent5c229f921fbd6f1ffae4038c05bf32f9b4051684 (diff)
downloadpoky-232ef8430e2cfbf6eee54f602dc74b9986e3997f.tar.gz
bitbake/fetch: ensure the mirrored repository is updated as required
If we fetch a tarball from a mirror it's entirely possible that the mirror will have been from before the required tag/branch/etc was included in the repository. To that end use forcefetch() as a way of testing whether the repository is up to date and if not fetch updates. Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index ab097dda53..9a99b346b3 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -259,7 +259,9 @@ def go(d, urls = None):
259 # First try fetching uri, u, from PREMIRRORS 259 # First try fetching uri, u, from PREMIRRORS
260 mirrors = [ i.split() for i in (bb.data.getVar('PREMIRRORS', d, 1) or "").split('\n') if i ] 260 mirrors = [ i.split() for i in (bb.data.getVar('PREMIRRORS', d, 1) or "").split('\n') if i ]
261 localpath = try_mirrors(d, u, mirrors, False, m.forcefetch(u, ud, d)) 261 localpath = try_mirrors(d, u, mirrors, False, m.forcefetch(u, ud, d))
262 if not localpath: 262
263 # Need to re-test forcefetch() which will return true if our copy is too old
264 if m.forcefetch(u, ud, d) or not localpath:
263 # Next try fetching from the original uri, u 265 # Next try fetching from the original uri, u
264 try: 266 try:
265 m.go(u, ud, d) 267 m.go(u, ud, d)