base.bbclass: pull in file-native for src.rpm
authorChristopher Larson <kergoth@gmail.com>
Mon, 6 Jan 2014 17:17:27 +0000 (10:17 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Jan 2014 22:17:33 +0000 (22:17 +0000)
Unpacking an src.rpm uses rpm2cpio.sh, which requires 'file'.

Without this, builds of rpm on a host without 'file' installed will fail with
very strange messages.

(From OE-Core rev: 97e1d84e2d1a74791ce6af88ddc27963bc0e1bec)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index 73920fd..2e5217b 100644 (file)
@@ -582,6 +582,10 @@ python () {
     if ".zip" in srcuri:
         d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
 
+    # file is needed by rpm2cpio.sh
+    if ".src.rpm" in srcuri:
+        d.appendVarFlag('do_unpack', 'depends', ' file-native:do_populate_sysroot')
+
     set_packagetriplet(d)
 
     # 'multimachine' handling