Setting image feature dev-pkgs bring ptest package of libgpiod
Hi all,
I have found while using *libgpiod* package from meta-oe that you get the ptest package when the IMAGE_FEATURE option *dev-pkgs* is enabled. This looks for me as a bug because it should only bring the normal and dev package of the *libgpiod*. I check if the dev package came with the ptest folder from do_install, but the packages split of the recipe looks fine to me.
I could not find in the recipe anything that could tell me why this is happening. I would like to know if someone has an idea how to disable this thing. I want to control which ptest packages are in my dev machine to reduce the time execution of the ptests.
Thank you
Quoted 4 lines · Jairo Mejia Aponte via lists.yoctoproject.org
Hi all,
I have found while using libgpiod package from meta-oe that you get the ptest package when theIMAGE_FEATUREoption dev-pkgs is enabled. This looks for me as a bug because it should only bring the normal and dev package of the libgpiod. I check if the dev package came with the ptest folder fromdo_install, but the packages split of the recipe looks fine to me. I could not find in the recipe anything that could tell me why this is happening. I would like to know if someone has an idea how to disable this thing. I want to control which ptest packages are in my dev machine to reduce the time execution of the ptests.
The easiest way to figure this out is to use the package manager to remove libgpiod-ptest package in the image. That should fail and tell you what the dependency is.
Ross
Hi Ross,
Thank you for the quick answer.
Quoted 5 lines
The easiest way to figure this out is to use the package manager to remove libgpiod-ptest package in the image. That should fail and tell you what the dependency is.
I double check the deploy-rpms folder and I do not have a ptest package from this recipe. I think that I do not fully follow, how exactly can I use the package manager to remove the libgpiod-ptest package from the image?
Quoted 5 lines · Jairo Mejia Aponte via Lists.Yoctoproject.Org
Hi Ross,
Thank you for the quick answer.
The easiest way to figure this out is to use the package manager to remove libgpiod-ptest package in the image. That should fail and tell you what the dependency is.
I double check the deploy-rpms folder and I do not have a ptest package from this recipe. I think that I do not fully follow, how exactly can I use the package manager to remove the libgpiod-ptest package from the image?
Now you’re giving contradictory statements: your image has the libgpiod-ptest package installed, but it doesn’t exist.
What package _exactly_ is being installed into your image, that you don’t want installed?
Ross
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*
Quoted 6 lines · Jairo Mejia Aponte via Lists.Yoctoproject.Org
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 theIMAGE_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.
Looks like you need to upgrade, or backport some fixes from meta-openembedded, specifically:
commit 0718d6e84d59ac84d47e3093280fa5369bf4c435
Author: Bartosz Golaszewski <[email protected]> Date: Fri Dec 6 12:11:29 2024 +0100
libgpiod: minimize intra-recipe dependencies for ptest
Make the packaging a bit more fine-grained. Create separate packages for the libgpiosim library and gpio-manager configuration files. Make the ptest package run-time depend on only the gpio-manager config. This way, we don't pull the entire daemon infrastructure if all we want is to run its test suite.
While at it: add GPIO udev rules to the gpio-manager config package. Currently they are in the main libgpiod package where they don't really belong.
Ross