Skip to contentSkip to conversation

lib/oe/unpack.py: unpack rar archives

PATCH In review Andreas Oberritter 2 participants 3 messages May 16, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/oe/unpack.py: unpack rar archives

---
 lib/oe/unpack.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
lib/oe/unpack.py +2 -0
index 8e8bf36..fa517d8 100644
@@ -96,6 +96,8 @@ def unpack_file(file, destdir, parameters, env=None):
             if dos:
                 cmd = '%s -a' % cmd
             cmd = "%s '%s'" % (cmd, file)
+        elif file.endswith('.rar'):
+            cmd = 'unrar x %s' % file
 
     if not unpack or not cmd:
         if os.path.isdir(file):
Signature · 1 line
1.7.2.5
Acked-by on v1 1/1
#1 lore raw

Am Montag, den 16.05.2011, 11:41 +0000 schrieb Andreas Oberritter:

Quoted 10 lines
---
 lib/oe/unpack.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
lib/oe/unpack.py +0 -0
index 8e8bf36..fa517d8 100644

lib/oe/unpack.py def unpack_file(file, destdir, parameters, env=None): · line 103

Quoted 8 lines
lib/oe/unpack.py +2 -0
@@ -96,6 +96,8 @@ def unpack_file(file, destdir, parameters, env=None):
             if dos:
                 cmd = '%s -a' % cmd
             cmd = "%s '%s'" % (cmd, file)
+        elif file.endswith('.rar'):
+            cmd = 'unrar x %s' % file
 
     if not unpack or not cmd:
         if os.path.isdir(file):

1. What program needs this? I am just asking to be able to test this.
2. Will unrar-native automatically be build when such an archive is encountered?

Thanks,

Paul

#2 lore raw
Quoted 17 lines · Paul Menzel

Am Montag, den 16.05.2011, 11:41 +0000 schrieb Andreas Oberritter:

Quoted 16 lines
---
 lib/oe/unpack.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
lib/oe/unpack.py +2 -0
index 8e8bf36..fa517d8 100644
@@ -96,6 +96,8 @@ def unpack_file(file, destdir, parameters, env=None):
             if dos:
                 cmd = '%s -a' % cmd
             cmd = "%s '%s'" % (cmd, file)
+        elif file.endswith('.rar'):
+            cmd = 'unrar x %s' % file
 
Quoted 4 lines

lib/oe/unpack.py def unpack_file(file, destdir, parameters, env=None): · line 103

Quoted 2 lines
lib/oe/unpack.py +0 -0
     if not unpack or not cmd:
         if os.path.isdir(file):

1. What program needs this? I am just asking to be able to test this.

A recipe in a private layer.

Quoted 2 lines

2. Will unrar-native automatically be build when such an archive is encountered?

No. IIRC, adding that dependency created a non-trivial dependency problem. I figured it would be preferrable to use the host's unrar.

Quoted 1 line

Thanks,
Andreas