[OE-core] [PATCH 1/1] scripts/oe-setup-rpmrepo: leverage oe-run-native
brian avery
brian.avery at intel.com
Thu Jun 29 21:41:37 UTC 2017
RSS means we no longer have a large native sysroot to run binaries from.
oe-run-native deals with this already, so this patch uses oe-run-native
to call the createrepo_c native binary that we need to make the package
feed indices.
[YOCTO #11706]
Signed-off-by: brian avery <brian.avery at intel.com>
---
scripts/oe-setup-rpmrepo | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index df1c614..4e3d89e 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -72,7 +72,7 @@ setup_sysroot() {
BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
- fi
+ fi
}
setup_sysroot
@@ -88,16 +88,13 @@ if [ ! -d "$RPM_DIR" ]; then
echo "Error: rpm dir $RPM_DIR doesn't exist"
exit 1
fi
-
-CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo_c
-if [ ! -e "$CREATEREPO" ]; then
- echo "Error: can't find createrepo binary"
- echo "please run bitbake createrepo-native first"
- exit 1
+if ! oe-run-native createrepo-c-native createrepo_c "$RPM_DIR"&>/dev/null; then
+ echo "Could not run createrepo_c, using bitbake to add to"
+ echo "native sysroot and trying again..."
+ bitbake createrepo-c-native -caddto_recipe_sysroot
+ # this time show the error mesage in case it's helpful
+ if ! oe-run-native createrepo-c-native createrepo_c "$RPM_DIR"; then
+ exit 1
+ fi
fi
-
-export PATH=${PATH}:${OECORE_NATIVE_SYSROOT}/usr/bin
-
-$CREATEREPO "$RPM_DIR"
-
exit 0
--
1.9.1
More information about the Openembedded-core
mailing list