diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-11 12:06:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-11 12:06:44 +0000 |
commit | 7f30131faaa5e3fdb1191c9da95c5683cefafeb5 (patch) | |
tree | 80a690dce32420f0acaa7ba3f3b1f931f4d4e3c6 /bitbake | |
parent | 20ab1cb0ca10b0c7724f2154fe5b54c939b8a887 (diff) | |
download | poky-7f30131faaa5e3fdb1191c9da95c5683cefafeb5.tar.gz |
bitbake/fetch2: Correctly handle git mirror tarball fetching
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index d168cdff6b..b9e145a62b 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -441,10 +441,11 @@ def try_mirrors(d, origud, mirrors, check = False): | |||
441 | # We may be obtaining a mirror tarball which needs further processing by the real fetcher | 441 | # We may be obtaining a mirror tarball which needs further processing by the real fetcher |
442 | # If that tarball is a local file:// we need to provide a symlink to it | 442 | # If that tarball is a local file:// we need to provide a symlink to it |
443 | dldir = ld.getVar("DL_DIR", True) | 443 | dldir = ld.getVar("DL_DIR", True) |
444 | if not ud.localpath.startswith(dldir): | 444 | if os.path.basename(ud.localpath) != os.path.basename(origud.localpath): |
445 | if os.path.basename(ud.localpath) != os.path.basename(origud.localpath): | 445 | dest = os.path.join(dldir, os.path.basename(ud.localpath)) |
446 | os.symlink(ud.localpath, os.path.join(dldir, os.path.basename(ud.localpath))) | 446 | if not os.path.exists(dest): |
447 | return None | 447 | os.symlink(ud.localpath, dest) |
448 | return None | ||
448 | # Otherwise the result is a local file:// and we symlink to it | 449 | # Otherwise the result is a local file:// and we symlink to it |
449 | if not os.path.exists(origud.localpath): | 450 | if not os.path.exists(origud.localpath): |
450 | os.symlink(ud.localpath, origud.localpath) | 451 | os.symlink(ud.localpath, origud.localpath) |