From: Robert Yang Date: Sun, 2 Sep 2012 04:08:51 +0000 (+0800) Subject: bitbake: fetch2: unpack rpm, ipk and deb binary package X-Git-Tag: rev_ivi_2015_02_04~15646 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=863e3a999d77bba891d837d7fea67ad786cf617c;p=scm%2Fbb%2Ftizen-distro.git bitbake: 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 rev: de7ceb9459574f33920ccc06255b533434f0ec25) Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 12ebce2..00fafb6 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -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!