Skip to contentSkip to conversation

fetch2: unpack rpm, ipk and deb binary package

PATCH Applied Robert Yang 2 participants 3 messages Sep 2, 2012 – Sep 7, 2012

lore
Share & tools
lore
#0 lore raw

cover fetch2: unpack rpm, ipk and deb binary package

This is useful for unpacking the binary package.

// Robert

The following changes since commit 9ba1e33e2d14362971d6441ee6142bcb0857df1a:

sstate: Ensure master.list exists if it doesn't already (2012-08-30 22:45:56 -0700)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib robert/unpack_rpm_ipk_deb
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/unpack_rpm_ipk_deb

Robert Yang (1):
fetch2: unpack rpm, ipk and deb binary package

 bitbake/lib/bb/fetch2/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.11.2
#1 lore raw

PATCH 1/1 fetch2: unpack rpm, ipk and deb binary package

* Unpack the ".rpm" binary package (only .src.rpm in the past)

* Unpack the .deb and .ipk binary package, their unpack commands are the same.

* This is useful for binary package recipe.

[YOCTO #1592]

---
 bitbake/lib/bb/fetch2/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
bitbake/lib/bb/fetch2/__init__.py +3 -1
index 12ebce2..00fafb6 100644
@@ -938,7 +938,7 @@ class FetchMethod(object):
                 if dos:
                     cmd = '%s -a' % cmd
                 cmd = "%s '%s'" % (cmd, file)
-            elif file.endswith('.src.rpm') or file.endswith('.srpm'):
+            elif file.endswith('.rpm') or file.endswith('.srpm'):
                 if 'extract' in urldata.parm:
                     unpack_file = urldata.parm.get('extract')
                     cmd = 'rpm2cpio.sh %s | cpio -i %s' % (file, unpack_file)
@@ -946,6 +946,8 @@ class FetchMethod(object):
                     iterate_file = unpack_file
                 else:
                     cmd = 'rpm2cpio.sh %s | cpio -i' % (file)
+            elif file.endswith('.deb') or file.endswith('.ipk'):
+                cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file
 
         if not unpack or not cmd:
             # If file == dest, then avoid any copies, as we already put the file into dest!
Signature · 1 line
1.7.11.2
#2 lore raw
Quoted 4 lines · Robert Yang

* Unpack the ".rpm" binary package (only .src.rpm in the past)

* Unpack the .deb and .ipk binary package, their unpack commands are the same.

Quoted 8 lines

* This is useful for binary package recipe.

[YOCTO #1592]

---
 bitbake/lib/bb/fetch2/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Merged to master, thanks.

Richard