On Fri, Oct 13, 2023 at 9:21 AM Robert P. J. Day <rpj...@crashcourse.ca> wrote:
>
>
>   i'm perusing the rust_1.70.0.bb recipe file, and i'm puzzled by the
> fact that it defines its own do_install() to simply call
> rust_do_install(), which then implements variations of that function:
>
> https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/rust/rust_1.70.0.bb#n244
>
>   do_install () {
>     rust_do_install
>   }
>
>   rust_do_install() {
>     rust_runx install
>   }
>
>   rust_do_install:class-nativesdk() {
>     export PSEUDO_UNLOAD=1
>     rust_runx install
>     rust_runx install clippy
>     ... snip ...
>
> i'm familiar with bbclass files defining things like that; eg.,
> autotools.bbclass defining:
>
>   autotools_do_install() {
>         oe_runmake 'DESTDIR=${D}' install it if it exists.
>         if [ -e "${D}${infodir}/dir" ]; then
>                 rm -f ${D}${infodir}/dir
>         fi
>   }
>
> but examples like that are generally then listed in EXPORT_FUNCTIONS
> so subsequent recipes can invoke them as part of *their* do_install(),
> like this snippet from the tar recipe:
>
>   do_install () {
>     autotools_do_install
>     ln -s tar ${D}${bindir}/gtar
>   }
>
> but i'm not sure why the rust recipe file is doing what it's doing.
> could it not have just defined variations of do_install() and gotten
> the same effect? or is there something more subtle happening here?
>

Inertia, I think. If you read back through the history in
oe-core/meta-rust the separation between pieces has changed over time
- probably when the .inc  was merged into the .bb I should have
refactored it as you suggest, but when the cycle time is as slow as
the rust build, trying things for the sake of it isn't fun...

-- 
Alex Kiernan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189046): 
https://lists.openembedded.org/g/openembedded-core/message/189046
Mute This Topic: https://lists.openembedded.org/mt/101936139/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to