summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-19 13:09:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-19 13:22:48 +0000
commit50fd02ecdc1e05755cb4f0144f3160c57a2b6240 (patch)
tree310458eac46ff40bb37c8d611be58cffa4c3a2a3 /bitbake
parentc496b293526522ddb7604abfcc9c0b9121f76a72 (diff)
downloadtizen-distro-50fd02ecdc1e05755cb4f0144f3160c57a2b6240.tar.gz
tizen-distro-50fd02ecdc1e05755cb4f0144f3160c57a2b6240.tar.bz2
tizen-distro-50fd02ecdc1e05755cb4f0144f3160c57a2b6240.zip
bitbake: fetch2: Fix handling of SCM mirrors in MIRRORS
If an SCM mirror is in PREMIRRORS, the tarball is downloaded and then found by the "upstream" check and handled correctly. If an SCM mirror is in MIRRORS, the tarball is downloaded but not used since there is no "upstream" run after MIRRORS completes. It therefore sits there useless and unused. This code change forces the upstream to run after a mirror tarball is found and fixes the usage of SCM mirrors in MIRRORS. (Bitbake rev: a66ee0994645aa5658b2f5ea134ed17d89f8751a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 451d104f67..b9f673c214 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -805,6 +805,10 @@ def try_mirror_url(newuri, origud, ud, ld, check = False):
dest = os.path.join(dldir, os.path.basename(ud.localpath))
if not os.path.exists(dest):
os.symlink(ud.localpath, dest)
+ if not os.path.exists(origud.donestamp) or origud.method.need_update(origud.url, origud, ld):
+ origud.method.download(origud.url, origud, ld)
+ if hasattr(ud.method,"build_mirror_data"):
+ origud.method.build_mirror_data(origud.url, origud, ld)
return None
# Otherwise the result is a local file:// and we symlink to it
if not os.path.exists(origud.localpath):