diff options
Diffstat (limited to 'classes')
-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) |