[oe-commits] Chris Larson : base.bbclass: unbork oe_unpack_file
git version control
git at git.openembedded.org
Sat Apr 24 16:43:03 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 757ec3d76d258c15828de2d85dd8ce9abb4c1323
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=757ec3d76d258c15828de2d85dd8ce9abb4c1323
Author: Chris Larson <clarson at kergoth.com>
Date: Sat Apr 24 09:42:17 2010 -0700
base.bbclass: unbork oe_unpack_file
I accidentally messed up the merge, sorry about that.
Signed-off-by: Chris Larson <clarson at kergoth.com>
---
classes/base.bbclass | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 50bcc30..e48cbac 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
More information about the Openembedded-commits
mailing list