Hi,
I was looking the code in more deep and I found out that even though there is a ptest and ptest-dev defined on the recipe and the folders are created as such in package-split folder, at the end the package name change to a package that is named after a shared library that is added in the ptest package. This is the line that makes the RPM package to change the name:
FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*"
This seems to trigger a change of name for the ptest package to the name of the library. Because the new package name contains the -dev, this is added when setting the dev-pkgs in the IMAGE_FEATURES. If I remove that line for the ptest, the name of the package is the ptest expected and it is not added to the image at the end.
This is how the directories looks like:
ls -l tmp/work/core2-64-poky-linux/libgpiod/2.1.2/packages-split
drwxr-xr-x libgpiod
drwxr-xr-x libgpiod-dbg
drwxr-xr-x libgpiod-dev
drwxr-xr-x libgpiod-doc
drwxr-xr-x libgpiod-locale
drwxr-xr-x libgpiod-ptest
drwxr-xr-x libgpiod-ptest-dev
.rw-r--r-- libgpiod-ptest.shlibdeps
drwxr-xr-x libgpiod-src
drwxr-xr-x libgpiod-staticdev
drwxr-xr-x libgpiod-tools
.rw-r--r-- libgpiod-tools.shlibdeps
.rw-r--r-- libgpiod.shlibdeps
drwxr-xr-x libgpiodcxx
.rw-r--r-- libgpiodcxx.shlibdeps
ls -l tmp/work/core2-64-poky-linux/libgpiod/2.1.2/deploy-rpms/core2_64
.rw-r--r-- libgpiod-dbg-2.1.2-r0.core2_64.rpm
.rw-r--r-- libgpiod-dev-2.1.2-r0.core2_64.rpm
.rw-r--r-- libgpiod-src-2.1.2-r0.core2_64.rpm
.rw-r--r-- libgpiod-tools-2.1.2-r0.core2_64.rpm
.rw-r--r-- libgpiod3-2.1.2-r0.core2_64.rpm
.rw-r--r-- libgpiodcxx2-2.1.2-r0.core2_64.rpm
.rw-r--r-- libgpiosim-dev-2.1.2-r0.core2_64.rpm
.rw-r--r-- libgpiosim1-2.1.2-r0.core2_64.rpm