diff options
author | Chris Larson <clarson@kergoth.com> | 2006-07-28 08:07:58 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2006-07-28 08:07:58 +0000 |
commit | 0301a8d727c9764c2e9a2480d3c8da7807803913 (patch) | |
tree | 7f45fc1a8b4f1b3c947f9aab919b9f964c989c92 /classes/base.bbclass | |
parent | ac34fac42763eee1a8f39619c21700bcac0a0e9e (diff) |
base.bbclass: bugfix in oe_unpack_file
* Fix an issue with file:// urls in SRC_URI which reside in WORKDIR. With
this issue fixed, patches within tarballs can be successfully applied to
${S}.
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r-- | classes/base.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 49d6260090..85756edacd 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -398,8 +398,15 @@ def oe_unpack_file(file, data, url = None): destdir = "." bb.mkdirhier("%s/%s" % (os.getcwd(), destdir)) cmd = 'cp %s %s/%s/' % (file, os.getcwd(), destdir) + if not cmd: return True + + dest = os.path.join(os.getcwd(), os.path.basename(file)) + if os.path.exists(dest): + if os.path.samefile(file, dest): + return True + cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd) bb.note("Unpacking %s to %s/" % (file, os.getcwd())) ret = os.system(cmd) |