[OE-core] [OE-Core][PATCH 07/13] musl: Ensure GLIBC_LDSO symlink target does not exist on reinstall
Serhey Popovych
serhe.popovych at gmail.com
Mon Dec 17 09:49:59 UTC 2018
Richard Purdie wrote:
> On Fri, 2018-12-14 at 11:09 -0800, Andre McCurdy wrote:
>> On Fri, Dec 14, 2018 at 9:57 AM Serhey Popovych
>> <serhe.popovych at gmail.com> wrote:
>>> Otherwise do_install task will fail on rebuild.
>>>
>>> Signed-off-by: Serhey Popovych <serhe.popovych at gmail.com>
>>> ---
>>> meta/recipes-core/musl/musl_git.bb | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-
>>> core/musl/musl_git.bb
>>> index 9cc875c..4593cde 100644
>>> --- a/meta/recipes-core/musl/musl_git.bb
>>> +++ b/meta/recipes-core/musl/musl_git.bb
>>> @@ -61,7 +61,7 @@ do_install() {
>>> oe_runmake install DESTDIR='${D}'
>>>
>>> install -d ${D}${bindir}
>>> - rm -f ${D}${bindir}/ldd
>>> + rm -f ${D}${bindir}/ldd ${D}${GLIBC_LDSO}
>>
>> The correct fix here is actually to remove this line entirely. The
>> official ruling is that there should be no expectation that re-
>> running do_install should work and patches to make it work are not
>> acceptable.
>>
>>
>> http://lists.openembedded.org/pipermail/openembedded-core/2018-September/273723.html
>
> Lets be clear, re-running the do_install task *is* supported and works
> today. It is actually meant to work when re-run. do_install clears out
> ${D} at its start so we can assume in do_install functions that it is
> empty at the start of the function.
It seems do_install does not clear ${D} or I do something wrong:
$ bitbake core-image-sato
<success>
<Adjust gcc/musl recipe and then run>
$ bitbake core-image-sato
...
/image/usr/lib64/libc.so
/home/serhe/devel/git/openembedded-core/build/tmp-musl/work/ppc64p8le-oe-linux-musl/musl/1.1.20+gitAUTOINC+39ef612aa1-r0/image/lib64/ld-musl-powerpc64le.so.1
|| true
| Traceback (most recent call last):
| File "/home/serhe/devel/git/openembedded-core/scripts/lnr", line 21,
in <module>
| os.symlink(target, linkname)
| FileExistsError: [Errno 17] File exists: 'image/usr/lib64/libc.so' ->
'/home/serhe/devel/git/openembedded-core/build/tmp-musl/work/ppc64p8le-oe-linux-musl/musl/1.1.20+gitAUTOINC+39ef612aa1-r0/imageNone'
| WARNING:
/home/serhe/devel/git/openembedded-core/build/tmp-musl/work/ppc64p8le-oe-linux-musl/musl/1.1.20+gitAUTOINC+39ef612aa1-r0/temp/run.do_install.77856:1
exit 1 from 'lnr
/home/serhe/devel/git/openembedded-core/build/tmp-musl/work/ppc64p8le-oe-linux-musl/musl/1.1.20+gitAUTOINC+39ef612aa1-r0/image/usr/lib64/libc.so
/home/serhe/devel/git/openembedded-core/build/tmp-musl/work/ppc64p8le-oe-linux-musl/musl/1.1.20+gitAUTOINC+39ef612aa1-r0/imageNone'
| ERROR: Function failed: do_install (log file is located at
/home/serhe/devel/git/openembedded-core/build/tmp-musl/work/ppc64p8le-oe-linux-musl/musl/1.1.20+gitAUTOINC+39ef612aa1-r0/temp/log.do_install.77856)
ERROR: Task
(/home/serhe/devel/git/openembedded-core/meta/recipes-core/musl/musl_git.bb:do_install)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 2713 tasks of which 2703 didn't need to
be rerun and 1 failed.
...
>
> The only problem may be if you're manually re-running the do_install
> script in WORKDIR/temp. If you're doing that, you have other problems
> like the missing fakeroot environment to handle so the non-empty
> directory is only one minor issue, you're missing other setup pieces as
> well.
I haven't play with do_install scripts in WORKDIR/temp. Only
do_configure and do_build. But anyway thank for pointing for potential
problems.
>
> Cheers,
>
> Richard
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181217/4f076131/attachment-0001.sig>
More information about the Openembedded-core
mailing list