bitbake: fetch2: add "-d" option to cpio

Add "-d" option to cpio since it is useful:
  -d
  --make-directories
  Create leading directories where needed.

[YOCTO #3137]

(Bitbake rev: a78f9ded7896432b107f34c0bb608b389fdb676a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang 2012-09-26 17:07:57 +08:00 committed by Richard Purdie
parent 5c1345c75d
commit faaa0653c2
1 changed files with 2 additions and 2 deletions

View File

@ -950,11 +950,11 @@ class FetchMethod(object):
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)
cmd = 'rpm2cpio.sh %s | cpio -id %s' % (file, unpack_file)
iterate = True
iterate_file = unpack_file
else:
cmd = 'rpm2cpio.sh %s | cpio -i' % (file)
cmd = 'rpm2cpio.sh %s | cpio -id' % (file)
elif file.endswith('.deb') or file.endswith('.ipk'):
cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file