diff options
author | Khem Raj <raj.khem@gmail.com> | 2010-07-06 16:02:48 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-07-07 11:37:04 -0700 |
commit | 74e32f114272668dfa4c88805741cf55ef965989 (patch) | |
tree | 7fc75a9e6977d648d673dcb5243900f985d9f9d4 /classes | |
parent | b4cbc6a2e6dffd367b7362f352699cb5a442cbc5 (diff) |
base.bbclass: re-add backward compatibility with bitbake w.r.t decodeurl fix in bitbake
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 2da0b7a67d..b30310d446 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -219,14 +219,25 @@ def oe_unpack_file(file, data, url = None): # The "destdir" handling was specifically done for FILESPATH # items. So, only do so for file:// entries. if type == "file": - dest = os.path.dirname(path) or "." + if not host: + dest = os.path.dirname(path) or "." + else: + # this case is for backward compatiblity with older version + # of bitbake which do not have the fix + # http://cgit.openembedded.org/cgit.cgi/bitbake/commit/?id=ca257adc587bb0937ea76d8b32b654fdbf4192b8 + # this should not be needed once all releases of bitbake has this fix + # applied/backported + dest = host + os.path.dirname(path) or "." else: dest = "." bb.mkdirhier("%s" % os.path.join(os.getcwd(),dest)) cmd = 'cp %s %s' % (file, os.path.join(os.getcwd(), dest)) if not cmd: return True - dest = os.path.join(os.getcwd(), path) + if not host: + dest = os.path.join(os.getcwd(), path) + else: + dest = os.path.join(os.getcwd(), os.path.join(host, path)) if os.path.exists(dest): if os.path.samefile(file, dest): return True |