Patchwork [3/4] createrepo: drop the usage of create_wrapper

login
register
mail settings
Submitter Ross Burton
Date June 12, 2013, 4:49 p.m.
Message ID <b08abe484b4481c035d838bcd5954b8348de7413.1371055550.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/51615/
State Accepted
Commit ec0b81a5319cb7258cdf30458c5740a687977ed2
Headers show

Comments

Ross Burton - June 12, 2013, 4:49 p.m.
create_wrapper was previously abused to invoke the Python interpretter directly
instead of relying on #! parsing, which is read into a 128 byte buffer so breaks
with deep build directories.

However now that we already install a "nativepython" binary into the native
sysroot, use sed to change the #! line to /usr/bin/env nativepython.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-support/createrepo/createrepo_0.4.11.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
index c977c2e..523d31b 100644
--- a/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -35,7 +35,7 @@  do_install_append_class-native () {
 	for i in ${D}${datadir}/createrepo/genpkgmetadata.py \
 		 ${D}${datadir}/createrepo/modifyrepo.py \
 		 ${D}${bindir}/rpm-createsolvedb.py ; do
-		create_wrapper $i ${STAGING_BINDIR_NATIVE}/python-native/python
+		sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i
 	done
 
 	create_wrapper ${D}/${bindir}/createrepo \