summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2010-04-24 09:42:17 -0700
committerChris Larson <clarson@kergoth.com>2010-04-24 09:42:24 -0700
commit757ec3d76d258c15828de2d85dd8ce9abb4c1323 (patch)
tree4ac9c6122946fd47819c576a50261ea3931d5841 /classes
parentf696515418e81bd62e322b28dc6087fb2fdccb2f (diff)
base.bbclass: unbork oe_unpack_file
I accidentally messed up the merge, sorry about that. Signed-off-by: Chris Larson <clarson@kergoth.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass17
1 files changed, 8 insertions, 9 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 50bcc30af9..e48cbacc07 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -161,15 +161,14 @@ python base_do_fetch() {
raise bb.build.FuncFailed("Checksum of '%s' failed" % uri)
}
-def oe_unpack_file(file, data, url = None):
- import subprocess
- if not url:
- url = "file://%s" % file
- dots = file.split(".")
- if dots[-1] in ['gz', 'bz2', 'Z']:
- efile = os.path.join(bb.data.getVar('WORKDIR', data, 1),os.path.basename('.'.join(dots[0:-1])))
- else:
- efile = file
+def oe_unpack_file(file, destdir, **options):
+ import subprocess, shutil
+
+ dest = os.path.join(destdir, os.path.basename(file))
+ if os.path.exists(dest):
+ if os.path.samefile(file, dest):
+ return True
+
cmd = None
if file.endswith('.tar'):
cmd = 'tar x --no-same-owner -f %s' % file