[oe-commits] Chris Larson : Handle .lz/.tar.lz URIs

git version control git at git.openembedded.org
Tue Oct 26 19:19:48 UTC 2010


Module: openembedded.git
Branch: master
Commit: 77c46353c6836668b67c28691279177ccce8d483
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=77c46353c6836668b67c28691279177ccce8d483

Author: Chris Larson <chris_larson at mentor.com>
Date:   Tue Oct 26 12:14:42 2010 -0700

Handle .lz/.tar.lz URIs

Signed-off-by: Chris Larson <chris_larson at mentor.com>

---

 classes/base.bbclass |    5 +++++
 lib/oe/unpack.py     |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index d4d8257..b1159e8 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -386,6 +386,11 @@ python () {
         depends = depends + " unzip-native:do_populate_sysroot"
         bb.data.setVarFlag('do_unpack', 'depends', depends, d)
 
+    if ".lz" in src_uri:
+        depends = bb.data.getVarFlag('do_unpack', 'depends', d) or ""
+        depends = depends + " lzip-native:do_populate_sysroot"
+        bb.data.setVarFlag('do_unpack', 'depends', depends, d)
+
     # 'multimachine' handling
     mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1)
     pkg_arch = bb.data.getVar('PACKAGE_ARCH', d, 1)
diff --git a/lib/oe/unpack.py b/lib/oe/unpack.py
index 5a8334b..e4fe5d8 100644
--- a/lib/oe/unpack.py
+++ b/lib/oe/unpack.py
@@ -73,6 +73,11 @@ def unpack_file(file, destdir, dos=False, env=None):
     elif file.endswith('.xz'):
         root, ext = os.path.splitext(file)
         cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
+    elif file.endswith('.tar.lz'):
+        cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
+    elif file.endswith('.lz'):
+        root, ext = os.path.splitext(file)
+        cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
     elif file.endswith('.zip') or file.endswith('.jar'):
         cmd = 'unzip -q -o'
         if dos:





More information about the Openembedded-commits mailing list