diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-09-02 12:08:51 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-07 12:10:42 +0100 |
commit | 7d8b49cfe478e82ca0a06095a5b3699c50b34080 (patch) | |
tree | e2b6c82ca836652d31fa75eaa5aa3cc36706a758 /bitbake | |
parent | 399d7f20294766b9bf5d11902725b8167802bb30 (diff) | |
download | poky-7d8b49cfe478e82ca0a06095a5b3699c50b34080.tar.gz |
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 <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 12ebce2687..00fafb68c1 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -938,7 +938,7 @@ class FetchMethod(object): | |||
938 | if dos: | 938 | if dos: |
939 | cmd = '%s -a' % cmd | 939 | cmd = '%s -a' % cmd |
940 | cmd = "%s '%s'" % (cmd, file) | 940 | cmd = "%s '%s'" % (cmd, file) |
941 | elif file.endswith('.src.rpm') or file.endswith('.srpm'): | 941 | elif file.endswith('.rpm') or file.endswith('.srpm'): |
942 | if 'extract' in urldata.parm: | 942 | if 'extract' in urldata.parm: |
943 | unpack_file = urldata.parm.get('extract') | 943 | unpack_file = urldata.parm.get('extract') |
944 | cmd = 'rpm2cpio.sh %s | cpio -i %s' % (file, unpack_file) | 944 | cmd = 'rpm2cpio.sh %s | cpio -i %s' % (file, unpack_file) |
@@ -946,6 +946,8 @@ class FetchMethod(object): | |||
946 | iterate_file = unpack_file | 946 | iterate_file = unpack_file |
947 | else: | 947 | else: |
948 | cmd = 'rpm2cpio.sh %s | cpio -i' % (file) | 948 | cmd = 'rpm2cpio.sh %s | cpio -i' % (file) |
949 | elif file.endswith('.deb') or file.endswith('.ipk'): | ||
950 | cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file | ||
949 | 951 | ||
950 | if not unpack or not cmd: | 952 | if not unpack or not cmd: |
951 | # If file == dest, then avoid any copies, as we already put the file into dest! | 953 | # If file == dest, then avoid any copies, as we already put the file into dest! |