Patchwork base.bbclass: pull in file-native for src.rpm

login
register
mail settings
Submitter Christopher Larson
Date Jan. 6, 2014, 5:17 p.m.
Message ID <1389028647-450-1-git-send-email-kergoth@gmail.com>
Download mbox | patch
Permalink /patch/64181/
State New
Headers show

Comments

Christopher Larson - Jan. 6, 2014, 5:17 p.m.
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.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
---
 meta/classes/base.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 73920fd..2e5217b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -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