Patchwork [bitbake-devel,1/1] fetch2: add "-d" option to cpio

login
register
mail settings
Submitter Robert Yang
Date Sept. 26, 2012, 9:07 a.m.
Message ID <a396909f81ca30ac584002d0fe1b672afdefc46e.1348646054.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/37245/
State New
Headers show

Comments

Robert Yang - Sept. 26, 2012, 9:07 a.m.
Add "-d" option to cpio since it is useful:
  -d
  --make-directories
  Create leading directories where needed.

[YOCTO #3137]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/fetch2/__init__.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Richard Purdie - Sept. 27, 2012, 3:43 p.m.
On Wed, 2012-09-26 at 17:07 +0800, Robert Yang wrote:
> Add "-d" option to cpio since it is useful:
>   -d
>   --make-directories
>   Create leading directories where needed.
> 
> [YOCTO #3137]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  bitbake/lib/bb/fetch2/__init__.py |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index a713418..ea52874 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -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