[OE-core] [PATCH] build-compare: ensure rpm command be available

Zhixiong Chi zhixiong.chi at windriver.com
Wed Mar 15 03:06:01 UTC 2017


If rpm command could not be found in the building server env, when the
pkg-diff.sh calls the function from functions.sh, it will occurs the error
"command not found" in mbp project, so that we get the wrong result for
comparing packages.
To ensure rpm command be avarilable, we use the rpm command frpm rpm-native
instead.

Signed-off-by: Zhixiong Chi <zhixiong.chi at windriver.com>
---
 meta/recipes-devtools/build-compare/build-compare_git.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/build-compare/build-compare_git.bb b/meta/recipes-devtools/build-compare/build-compare_git.bb
index eb12e40..b7f8c7a 100644
--- a/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -32,4 +32,9 @@ do_install() {
     install -m 755 srpm-check.sh ${D}/${bindir}
 }
 
+do_install_append_class-native() {
+    sed -i -e 's:RPM="rpm:RPM="${bindir}/rpm:g' ${D}/${bindir}/functions.sh
+    sed -i -e 's:rpm2cpio:${bindir}/rpm2cpio:g' ${D}/${bindir}/functions.sh
+}
+
 RDEPENDS_${PN} += "bash"
-- 
1.9.1




More information about the Openembedded-core mailing list