From: Junling Zheng <zhengjunling@huawei.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
<openembedded-core@lists.openembedded.org>
Cc: wangnan0@huawei.com
Subject: Re: [PATCH RESEND] staging.bbclass: Fix wrong library path in sysroot_strip
Date: Sat, 16 Nov 2019 18:33:40 +0800 [thread overview]
Message-ID: <1f666951-84df-d32d-d75d-e7a9a5527111@huawei.com> (raw)
In-Reply-To: <7c584d68f06bb9cd7ebea783e2277abc554c2f37.camel@linuxfoundation.org>
On 2019/11/16 7:21, Richard Purdie wrote:
> On Fri, 2019-11-15 at 18:45 +0800, Junling Zheng wrote:
>> Do not reset libdir and base_libdir in sysroot_strip, and just pass
>> crude
>> paths as they will be reset later in strip_execs.
>>
>> Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
>> ---
>> meta/classes/staging.bbclass | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
>> index cca0b7e0d6..58d57a4323 100644
>> --- a/meta/classes/staging.bbclass
>> +++ b/meta/classes/staging.bbclass
>> @@ -75,8 +75,6 @@ python sysroot_strip () {
>>
>> dstdir = d.getVar('SYSROOT_DESTDIR')
>> pn = d.getVar('PN')
>> - libdir = os.path.abspath(dstdir + os.sep + d.getVar("libdir"))
>> - base_libdir = os.path.abspath(dstdir + os.sep + d.getVar("base_libdir"))
>> qa_already_stripped = 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn) or "").split()
>> strip_cmd = d.getVar("STRIP")
>
> To show this function in full:
>
> python sysroot_strip () {
> inhibit_sysroot = d.getVar('INHIBIT_SYSROOT_STRIP')
> if inhibit_sysroot and oe.types.boolean(inhibit_sysroot):
> return
>
> dstdir = d.getVar('SYSROOT_DESTDIR')
> pn = d.getVar('PN')
> libdir = os.path.abspath(dstdir + os.sep + d.getVar("libdir"))
> base_libdir = os.path.abspath(dstdir + os.sep + d.getVar("base_libdir"))
> qa_already_stripped = 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn) or "").split()
> strip_cmd = d.getVar("STRIP")
>
> oe.package.strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d,
> qa_already_stripped=qa_already_stripped)
> }
>
> so if we apply this patch, we just have two undefined variables which
> we pass into oe.package.strip_execs() which would cause a undefined
> variable failure?
>
Yes, you're right. I'm sorry for my patch without testing :(
Removing them in strip_execs() will work, and I'll send a v2 patch :)
Thanks,
Junling
> I think I do see a potential problem as dstdir is added here and then
> again strip_execs() itself which does:
>
> def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripped=False):
>
> libdir = os.path.abspath(dstdir + os.sep + libdir)
> base_libdir = os.path.abspath(dstdir + os.sep + base_libdir)
>
> but the patch as submitted doesn't solve this.
>
> Cheers,
>
> Richard
>
>
> .
>
prev parent reply other threads:[~2019-11-16 10:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 10:45 [PATCH RESEND] staging.bbclass: Fix wrong library path in sysroot_strip Junling Zheng
2019-11-15 23:21 ` Richard Purdie
2019-11-16 10:33 ` Junling Zheng [this message]
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=1f666951-84df-d32d-d75d-e7a9a5527111@huawei.com \
--to=zhengjunling@huawei.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=wangnan0@huawei.com \
/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