Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] scripts: make createrepo_c run
@ 2017-06-29 21:41 brian avery
  2017-06-29 21:41 ` [PATCH 1/1] scripts/oe-setup-rpmrepo: leverage oe-run-native brian avery
  0 siblings, 1 reply; 2+ messages in thread
From: brian avery @ 2017-06-29 21:41 UTC (permalink / raw)
  To: openembedded-core

This uses oe-run-native to run the createrepo_c native binary. RSS means we need additional steps
to run native binaries, so it is better to consolidate the logic.

-brian avery

The following changes since commit 98099349e358a9caaec8ec81f0d4abe588909cfe:

  bitbake: npm fetcher: fix unknown variable name. (2017-06-29 14:33:42 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib bavery/core/11706
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/core/11706

brian avery (1):
  scripts/oe-setup-rpmrepo: leverage oe-run-native

 scripts/oe-setup-rpmrepo | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

--
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] scripts/oe-setup-rpmrepo: leverage oe-run-native
  2017-06-29 21:41 [PATCH 0/1] scripts: make createrepo_c run brian avery
@ 2017-06-29 21:41 ` brian avery
  0 siblings, 0 replies; 2+ messages in thread
From: brian avery @ 2017-06-29 21:41 UTC (permalink / raw)
  To: openembedded-core

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@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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-29 21:41 [PATCH 0/1] scripts: make createrepo_c run brian avery
2017-06-29 21:41 ` [PATCH 1/1] scripts/oe-setup-rpmrepo: leverage oe-run-native brian avery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox