[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH] perl: correct the path of perl used by ptest
From:       Bill Randle <bill.randle () gmail ! com>
Date:       2016-08-31 14:42:28
Message-ID: CA+n--H_aSwgXXtNj8VJO3JxDs0zC5RiOXRAqLp=nL8Bpp16U0g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Under what conditions is the explicit path to /usr/bin/perl required? Just
before your added code, it creates a symlink from the installed perl
location to the "t" directory where the tests are run. What if the perl
that was built was an alternate version and installed in /usr/local/bin?

    -Bill

On Tue, Aug 30, 2016 at 10:37 PM, Zhenbo Gao <zhenbo.gao@windriver.com>
wrote:

> some files from perl-ptest depends on perl, which is located at /usr/bin/
>
> Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
> ---
>  meta/recipes-devtools/perl/perl-ptest.inc | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/recipes-devtools/perl/perl-ptest.inc
> b/meta/recipes-devtools/perl/perl-ptest.inc
> index d136c5c..94e40e6 100644
> --- a/meta/recipes-devtools/perl/perl-ptest.inc
> +++ b/meta/recipes-devtools/perl/perl-ptest.inc
> @@ -24,6 +24,12 @@ do_install_ptest () {
>
>         ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
>
> +       # perl is located at /usr/bin/
> +       p='^#![/.]*perl'
> +       files=`grep -E ${p} ${D} -nr | grep -v -E 'Binary|win32' | cut -d
> ':' -f 1`
> +       for f in ${files}; do
> +               sed -i -e "s:${p}:#! ${USRBINPATH}/perl:g" ${f}
> +       done
>  }
>
>  python populate_packages_prepend() {
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[Attachment #5 (text/html)]

<div dir="ltr">Under what conditions is the explicit path to /usr/bin/perl required? \
Just before your added code, it creates a symlink from the installed perl location to \
the &quot;t&quot; directory where the tests are run. What if the perl that was built \
was an alternate version and installed in /usr/local/bin?<div><br></div><div>      \
-Bill</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug \
30, 2016 at 10:37 PM, Zhenbo Gao <span dir="ltr">&lt;<a \
href="mailto:zhenbo.gao@windriver.com" \
target="_blank">zhenbo.gao@windriver.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">some files from perl-ptest depends on perl, which is located \
at /usr/bin/<br> <br>
Signed-off-by: Zhenbo Gao &lt;<a \
                href="mailto:zhenbo.gao@windriver.com">zhenbo.gao@windriver.com</a>&gt;<br>
                
---<br>
  meta/recipes-devtools/perl/<wbr>perl-ptest.inc | 6 ++++++<br>
  1 file changed, 6 insertions(+)<br>
<br>
diff --git a/meta/recipes-devtools/perl/<wbr>perl-ptest.inc \
b/meta/recipes-devtools/perl/<wbr>perl-ptest.inc<br> index d136c5c..94e40e6 \
                100644<br>
--- a/meta/recipes-devtools/perl/<wbr>perl-ptest.inc<br>
+++ b/meta/recipes-devtools/perl/<wbr>perl-ptest.inc<br>
@@ -24,6 +24,12 @@ do_install_ptest () {<br>
<br>
            ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl<br>
<br>
+           # perl is located at /usr/bin/<br>
+           p=&#39;^#![/.]*perl&#39;<br>
+           files=`grep -E ${p} ${D} -nr | grep -v -E &#39;Binary|win32&#39; | cut -d \
&#39;:&#39; -f 1`<br> +           for f in ${files}; do<br>
+                       sed -i -e &quot;s:${p}:#! ${USRBINPATH}/perl:g&quot; ${f}<br>
+           done<br>
  }<br>
<br>
  python populate_packages_prepend() {<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
 <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" \
rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
 </font></span></blockquote></div><br></div>



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic