Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] glib-2.0: fix broken python script header on machines using buildtools
Date: Fri, 20 Sep 2013 15:43:45 +0100	[thread overview]
Message-ID: <1379688225-29241-1-git-send-email-paul.eggleton@linux.intel.com> (raw)

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@linux.intel.com>
---
 meta/recipes-core/glib-2.0/glib.inc | 4 +---
 1 file changed, 1 insertion(+), 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|'
 }
-- 
1.8.1.2



             reply	other threads:[~2013-09-20 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 14:43 Paul Eggleton [this message]
2013-09-20 16:04 ` [PATCH] glib-2.0: fix broken python script header on machines using buildtools Colin Walters
2013-09-20 16:14   ` Paul Eggleton
2013-09-20 16:19     ` Colin Walters
2013-09-20 16:27       ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379688225-29241-1-git-send-email-paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox