libcansocket: Weird issue with pkgsplit

Tuomas Huuki <tuomas.huuki@...>

Hello all,
I have an interesting situation with libcansocket and bitbake that I cannot wrap my head around. For some reason, the packages are being split up somewhat strangely and I cannot figure out why.
First of all, the recipe used is:
So no strange things there.

Additionally, looking at the built items:
../build/tmp/work/aarch64-poky-linux/libsocketcan/0.0.11-r0/image/usr/lib$ ls -lah libsocketcan*
lrwxrwxrwx 1 tuomas tuomas  21 maali 18 10:38 ->
lrwxrwxrwx 1 tuomas tuomas  21 maali 18 10:38 ->
-rwxr-xr-x 1 tuomas tuomas 58K maali 18 10:38

All looks good at this point. Now, when I deploy the image, the first link is missing.
When I look at pkgdata I can see that the link ends up in libsocketcan-dev:

$ oe-pkgdata-util list-pkg-files libsocketcan
$ oe-pkgdata-util list-pkg-files libsocketcan-dev

I have been through the logs and cannot figure out why.
I tried adding:

FILES_${PN} += "${libdir}/*.so"
But no luck.

Looking at pkgdata/runtime/libsocketcan I notice:
FILES_libsocketcan: /usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.* /usr/lib/*.so
FILES_INFO: {"/usr/lib/": 21, "/usr/lib/": 14080}
pkg_postinst_libsocketcan: #!/bin/sh\nset -e\nif [ x"$D" = "x" ]; then\n\tif [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi\nfi\n
FILERPROVIDESFLIST_libsocketcan: /usr/lib/
FILERDEPENDSFLIST_libsocketcan: /usr/lib/
PKGSIZE_libsocketcan: 14101
But again this is missing the .so for some reason.

Additionally, I noticed that for some reason the package is renamed to libsocketcan2 (log.do_package).
Why? Could this be part of the issue?
> NOTE: debian: renaming libsocketcan to libsocketcan2

How does pkgconfig decide how to split packages. Can anyone point me to proper documentation?

Tuomas Huuki
Crosscontrol Oy

Join to automatically receive all group messages.