On Sat, 2024-10-12 at 14:18 +0200, Alexander Kanavin wrote:
> On Sat, 12 Oct 2024 at 11:41, <claus.stovga...@gmail.com> wrote:
> > I am working more with it, and I think there might be a solution in
> > sight. Though if you have any ideas please share.
> 
> I think you need to run it through package name translation function,
> the same one that package.bbclass is using to do 'debian-style
> library
> package renaming'. I can't remember what it's called though.
> 
> Alex

Hi Alex and others reading this thread.

I ended up thinking my direction with using the RECOMMENDS was wrong.
When I was working with the problem, I figured out that my problem was
that my dummy package does not correctly fits with the automatically
runtime dependency part of Yocto, as there is no shlibdeps or pcdeps,
and depchains only handle dev and dbg packages.

So my solution ended up being a base class, just copying from DEPENDS
to RDEPENDS.

See
https://github.com/frosteyes/yocto-master/blob/fe/sdk_example/meta-fe/classes/dummy-package.bbclass


For specfic packages like sqlite3 and cli11 I handle it before
inheriting the class. Someething like

<snip>
# sqlite3 needs specific handling, as it package the dev package
# as libsqlite3-dev and not sqlite3-dev
DEPENDS:remove = "sqlite3"
RDEPENDS:${PN} += "libsqlite3"

# cli11 is header only, meaning there is no library to depend on. This
# means that the package itself does not depend on cli11, and by that
# cli11 is not automatically added to RDEPENDS so only add dev
# package runtime dependency.
DEPENDS:remove = "cli11"
RDEPENDS:${PN}-dev += "cli11-dev"

inherit dummy-package
</snip>

I was looking into some kind of verification that a dev package exist.
But it does not work on the parsing step.

Anyone knows of a solution for this?

# Verify a -dev package exist, or skip and warn that it need special
handling
        recipename = oe.packagedata.recipename(dep + '-dev', d)
        if not recipename:
                bb.warn("dummy-package: %s (Skipping DEPENDS: %s -
needs customs handling, no %s-dev exist)" % (pn, dep, dep) )
            continue


Maybe it would be better to move the function from an anonymous
function on parsing, to a function before the packaging task or
similar. If we can verify that a correct dev package exist.

Any inputs is welcome.

Also just to share for others to use.

/Claus
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#206583): 
https://lists.openembedded.org/g/openembedded-core/message/206583
Mute This Topic: https://lists.openembedded.org/mt/108685995/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