Hi Joshua,
I've founded a second function, in the same class, using ln -s
set_log_folder () {
bbplain "Set var log folder BEGIN"
rm -Rf ${IMAGE_ROOTFS}/var/log
ln -s /mnt/general_data/log/ ${IMAGE_ROOTFS}/var/log
bbplain "Set var log folder END"
}
The logs show "Set var log folder BEGIN" and "Set var log folder END" and no
issues ....
What the hell I'm doing wrong....
Martin Leduc
T : (418) 856-6896
[email protected]
-----Message d'origine-----
De : [email protected] <[email protected]> De la part de
Martin Leduc via lists.yoctoproject.org
Envoyé : 2 août 2022 10:20
À : Joshua Watt <[email protected]>
Cc : [email protected]
Objet : Re: [yocto] BBClass function and symbolic link (symlink) ... I throw in
the towel #python #bitbake #kirkstone
Hi Joshua,
Thank you for your quick reply.
Please see the crash log in the attachment.
"Also, I'm not quite clear what you mean by "works like a charm with Warrior";
it sounds like something still isn't working in Warrior that you need, or just
in Kirkstone?"
This bbclass is imported from a previous build make using the Yocto Warrior
version and the build report no failure using "ln -s" directly, well it compile.
BR,
-----Message d'origine-----
De : Joshua Watt <[email protected]> Envoyé : 2 août 2022 09:57 À : Martin
Leduc <[email protected]> Cc : [email protected] Objet :
[EXTERNAL] Re: [yocto] BBClass function and symbolic link (symlink) ... I throw
in the towel #python #bitbake #kirkstone
CAUTION: This email originated from outside of Luminator Technology Group. Do
not click links or open attachments unless you recognize the sender and know
the content is safe.
On Tue, Aug 2, 2022 at 8:44 AM Martin Leduc via lists.yoctoproject.org
<[email protected]> wrote:
>
> Hi team,
>
> Well, I throw in the towel. But it's looks like so simple .... for me 🤣🤣.
>
> I've a function to replace the version file in /etc/version. This function
> is integrated into my mybase-image.bbclass, defined in my layer and I add, in
> my core-image-minimal.bbappend recipe inherit mybase-image.bbclass.
>
> In my bbclass, I call my function using
>
> ROOTFS_POSTPROCESS_COMMAND += " \
> set_version_file ; \
> "
>
> My function is written like this
> set_version_file() {
> bbplain "set_version_file BEGIN"
> mkdir -p ${IMAGE_ROOTFS}/etc/tmp/
> echo ${PV} > ${IMAGE_ROOTFS}/etc/tmp/version
> chmod 644 ${IMAGE_ROOTFS}/etc/tmp/version
> rm ${IMAGE_ROOTFS}/etc/version
> ln -sf /etc/tmp/version "${IMAGE_ROOTFS}/etc/version"
> }
> Note: /etc/tmp is just for the purpose of this test
>
> I mean, I don't try to do anything outstanding but the ln -sf line makes my
> compilation crash BUT.... it works like a charm with Warrior but Kirkstone
> rejects "ln -sf" command.
Can you provide a little more detail about how it crashes? Also, I'm not quite
clear what you mean by "works like a charm with Warrior"; it sounds like
something still isn't working in Warrior that you need, or just in Kirkstone?
>
> I'm definitely not the only one who adds symlinks to the recipes
>
> I've also tried:
>
> lnr
> inherit relative_symlinks (don't have any impact but I've given it a
> try), from the poky folder I've tried grep -r "ln" ./* | grep bbclass
> (to validate the syntax) Read many posts on this topic
>
>
> I'm unable to find where is my issue.
>
> Any ideas are welcome, even if it works like a charm on Warrior but not in
> Kirkstone.
>
> BR,
> Martin
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#57735): https://lists.yoctoproject.org/g/yocto/message/57735
Mute This Topic: https://lists.yoctoproject.org/mt/92770329/21656
Mute #kirkstone:https://lists.yoctoproject.org/g/yocto/mutehashtag/kirkstone
Mute #python:https://lists.yoctoproject.org/g/yocto/mutehashtag/python
Mute #bitbake:https://lists.yoctoproject.org/g/yocto/mutehashtag/bitbake
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-