[oe-commits] Paul Eggleton : glib-2.0: fix broken python script header on machines using buildtools

git at git.openembedded.org git at git.openembedded.org
Sun Sep 22 11:11:18 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 1d16e8035dda062041394b1e51839a9a7d077cf5
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1d16e8035dda062041394b1e51839a9a7d077cf5

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Fri Sep 20 14:43:45 2013 +0000

glib-2.0: fix broken python script header on machines using buildtools

With buildtools (which contains Python) installed on a build machine,
glib-2.0's gtester-report script was ending up with the full path to
the installed python binary in the shebang, which when rpm packaging
was used led to this being added as a per-file dependency by rpmdeps for
the libglib-2.0-utils package in which it ends up. This of course broke
do_rootfs when the package was included in the rootfs and had been
restored from sstate from another machine, as happened on the Yocto
Project autobuilder.

We were already trying to sed this script apparently only for the
shebang (since it appears that there are no other paths in the script)
so let's just sed the shebang properly; it also seems sensible to do
this for native as well instead of explicitly trying to exclude that
case.

Fixes [YOCTO #5205].

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-core/glib-2.0/glib.inc |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index aa1d400..e57d2ac 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -46,7 +46,5 @@ ARM_INSTRUCTION_SET = "arm"
 USE_NLS = "yes"
 
 do_install_append () {
-	if [ "${PN}" != "glib-2.0-native" ]; then
-		sed ${D}${bindir}/gtester-report -i -e 's,${STAGING_BINDIR_NATIVE},${bindir},g'
-	fi
+	sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
 }



More information about the Openembedded-commits mailing list