From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id 2C8046AF9F for ; Fri, 22 Nov 2013 06:25:54 +0000 (UTC) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail.windriver.com (8.14.5/8.14.5) with ESMTP id rAM6PrLH029557 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 21 Nov 2013 22:25:53 -0800 (PST) Received: from [128.224.162.194] (128.224.162.194) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.2.347.0; Thu, 21 Nov 2013 22:25:52 -0800 Message-ID: <528EF8E6.9090301@windriver.com> Date: Fri, 22 Nov 2013 14:25:42 +0800 From: Hongxu Jia User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Saul Wold , , Mark Hatle References: <0e29f77b1778e75f547289c20e670fc0ffd5e070.1385039538.git.hongxu.jia@windriver.com> <528E541B.7000104@linux.intel.com> <528E6199.80306@windriver.com> <528E6239.8040507@linux.intel.com> <528EF295.9040704@windriver.com> In-Reply-To: <528EF295.9040704@windriver.com> Subject: Re: [PATCH 4/4] qemu: add bash and python to qemu's RDEPENDS X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2013 06:25:55 -0000 Content-Type: multipart/alternative; boundary="------------090301070200060002010102" --------------090301070200060002010102 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit On 11/22/2013 01:58 PM, Hongxu Jia wrote: > On 11/22/2013 03:42 AM, Saul Wold wrote: >> On 11/21/2013 11:40 AM, Mark Hatle wrote: >>> On 11/21/13, 12:42 PM, Saul Wold wrote: >>>> >>>> Why are you adding bash to qemu? >>> >>> My understanding is that there was a bash script that was added as >>> well, >>> once the python rdepends was resolved. >>> >> Any chance of "de-bashing" the script? >> > Hi Saul, The script could not be de-bashed, it was made by create_wrapper which is bashism: Vim image/usr/bin/qemu-mips ... #! /bin/bash realpath=`readlink -fn $0` export QEMU_RESERVED_VA=0x0 exec -a `dirname $realpath`/qemu-mips `dirname $realpath`/qemu-mips.real "$@" ... The exec's -a option is bashism, so we need to add bash to RDEPENDS. //Hongxu > Hi Saul, > > How about to de-bash the script by the following patch: > ... > --- a/meta/recipes-devtools/qemu/qemu.inc > +++ b/meta/recipes-devtools/qemu/qemu.inc > @@ -5,6 +5,7 @@ DEPENDS = "glib-2.0 zlib alsa-lib virtual/libx11 > pixman dtc libsdl" > DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native > pixman-native dtc-native" > DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl > nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc" > RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl" > +RDEPENDS_${PN}_class-target += "python" > > require qemu-targets.inc > inherit autotools > @@ -76,6 +77,12 @@ do_install_append() { > create_wrapper ${D}/${bindir}/qemu-mips \ > QEMU_RESERVED_VA=0x0 > fi > + > + # De-bashing the script > + files=`grep "^\#\! *.*\/bash" ${D} -rl` > + for f in $files; do > + sed -i "s:^#! *.*/bash:#! /bin/sh:" $f > + done > } > # END of qemu-mips workaround > ... > > The build test is ok. > > //Hongxu > >> Sau! >>> --Mark >>> >>>> Sau! >>>> >>>> >>>> On 11/21/2013 05:14 AM, Hongxu Jia wrote: >>>>> | Note: adding Smart RPM DB channel >>>>> | >>>>> | Note: to be installed: qemu@x86_64 run-postinsts@x86_64 >>>>> kernel-modules@qemux86_64 packagegroup-core-boot@qemux86_64 >>>>> | Loading cache... >>>>> | Updating cache... >>>>> ######################################## [100%] >>>>> | >>>>> | Computing transaction...error: Can't install >>>>> qemu-1.5.0-r0.0@x86_64: no package provides /usr/bin/python >>>>> | >>>>> | Saving cache... >>>>> | >>>>> | WARNING: exit code 1 from a shell command. >>>>> | ERROR: Function failed: do_rootfs (log file is located at >>>>> tmp/work/qemux86_64-wrs-linux/wrlinux-image-glibc-small/1.0-r1/temp/do_rootfs/log.do_rootfs.21373) >>>>> >>>>> >>>>> >>>>> Signed-off-by: Hongxu Jia >>>>> --- >>>>> meta/recipes-devtools/qemu/qemu.inc | 1 + >>>>> 1 file changed, 1 insertion(+) >>>>> >>>>> diff --git a/meta/recipes-devtools/qemu/qemu.inc >>>>> b/meta/recipes-devtools/qemu/qemu.inc >>>>> index 21ce489..3f3431d 100644 >>>>> --- a/meta/recipes-devtools/qemu/qemu.inc >>>>> +++ b/meta/recipes-devtools/qemu/qemu.inc >>>>> @@ -5,6 +5,7 @@ DEPENDS = "glib-2.0 zlib alsa-lib virtual/libx11 >>>>> pixman dtc libsdl" >>>>> DEPENDS_class-native = "zlib-native alsa-lib-native >>>>> glib-2.0-native pixman-native dtc-native" >>>>> DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl >>>>> nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc" >>>>> RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl" >>>>> +RDEPENDS_${PN}_class-target += "bash python" >>>>> >>>>> require qemu-targets.inc >>>>> inherit autotools >>>>> >>>> >>>> _______________________________________________ >>>> Openembedded-core mailing list >>>> Openembedded-core@lists.openembedded.org >>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core >>>> >>> >>> _______________________________________________ >>> Openembedded-core mailing list >>> Openembedded-core@lists.openembedded.org >>> http://lists.openembedded.org/mailman/listinfo/openembedded-core >>> >>> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.openembedded.org/mailman/listinfo/openembedded-core > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core --------------090301070200060002010102 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit
On 11/22/2013 01:58 PM, Hongxu Jia wrote:
On 11/22/2013 03:42 AM, Saul Wold wrote:
On 11/21/2013 11:40 AM, Mark Hatle wrote:
On 11/21/13, 12:42 PM, Saul Wold wrote:

Why are you adding bash to qemu?

My understanding is that there was a bash script that was added as well,
once the python rdepends was resolved.

Any chance of "de-bashing" the script?



Hi Saul,

The script could not be de-bashed,  it was made by create_wrapper
which is bashism:
Vim image/usr/bin/qemu-mips
...
#! /bin/bash
realpath=`readlink -fn $0`
export QEMU_RESERVED_VA=0x0
exec -a `dirname $realpath`/qemu-mips `dirname $realpath`/qemu-mips.real "$@"
...

The exec's -a option is bashism, so we need to add bash to RDEPENDS.

//Hongxu

Hi Saul,

How about to de-bash the script by the following patch:
...
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -5,6 +5,7 @@ DEPENDS = "glib-2.0 zlib alsa-lib virtual/libx11 pixman dtc libsdl"
 DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native dtc-native"
 DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc"
 RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl"
+RDEPENDS_${PN}_class-target += "python"

 require qemu-targets.inc
 inherit autotools
@@ -76,6 +77,12 @@ do_install_append() {
                create_wrapper ${D}/${bindir}/qemu-mips \
                        QEMU_RESERVED_VA=0x0
        fi
+
+       # De-bashing the script
+       files=`grep "^\#\! *.*\/bash" ${D} -rl`
+       for f in $files; do
+                 sed -i "s:^#! *.*/bash:#! /bin/sh:" $f
+       done
 }
 # END of qemu-mips workaround
...

The build test is ok.

//Hongxu

Sau!
--Mark

Sau!


On 11/21/2013 05:14 AM, Hongxu Jia wrote:
| Note: adding Smart RPM DB channel
|
| Note: to be installed:  qemu@x86_64 run-postinsts@x86_64
kernel-modules@qemux86_64 packagegroup-core-boot@qemux86_64
| Loading cache...
| Updating cache...
######################################## [100%]
|
| Computing transaction...error: Can't install
qemu-1.5.0-r0.0@x86_64: no package provides /usr/bin/python
|
| Saving cache...
|
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_rootfs (log file is located at
tmp/work/qemux86_64-wrs-linux/wrlinux-image-glibc-small/1.0-r1/temp/do_rootfs/log.do_rootfs.21373)


Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
   meta/recipes-devtools/qemu/qemu.inc | 1 +
   1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/qemu/qemu.inc
b/meta/recipes-devtools/qemu/qemu.inc
index 21ce489..3f3431d 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -5,6 +5,7 @@ DEPENDS = "glib-2.0 zlib alsa-lib virtual/libx11
pixman dtc libsdl"
   DEPENDS_class-native = "zlib-native alsa-lib-native
glib-2.0-native pixman-native dtc-native"
   DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl
nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc"
   RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl"
+RDEPENDS_${PN}_class-target += "bash python"

   require qemu-targets.inc
   inherit autotools


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--------------090301070200060002010102--