5

I'm trying to create a recipe for a custom library in Yocto. I'm currently getting this error:

ERROR: ... do_package: QA Issue: pot-plugin: Files/directories were installed but not shipped in any package:
  /usr/lib/qt5/plugins/mediaservice/a.so.1.0
  /usr/lib/qt5/plugins/mediaservice/a.so.1
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.

I already set those in FILES_${PN} but in that case Yocto complains about those being so symlinks, and that do not belong to the package. The proper thing would actually be to remove those also from the sysroot itself. I'm therefore trying to define the do_install step but I cannot find how to remove those before the package is created. I did something like:

do_install {
   rm <some_path>/a.so.1.0
   rm <some_path>/a.so.1
}

but I cannot find the proper path to use. Someone who can explain if this is the proper way to solve the issue and, in case it is, what path I should use to delete those files after those are installed and before the package is being created? Thanks!

Guy Avraham
  • 3,482
  • 3
  • 38
  • 50
Luca Carlon
  • 9,546
  • 13
  • 59
  • 91

2 Answers2

6

$D contains the path to the installroot so you can write

do_install_append() {
    rm -f ${D}/usr/lib/qt5/plugins/mediaservice/a.so.1.0 ...
}

But you probably want to replace /usr/lib/qt5/plugins by a variable too. To do this, inspect existing variables with

bitbake <recipe> -e | less
ensc
  • 6,704
  • 14
  • 22
  • Tried $D but not in do_install_append. Works perfectly, thanks! – Luca Carlon Mar 01 '18 at 23:40
  • @ensc - What about a situation that the recipe that installs the un-desired files already has its own implementation of the `do_install_append` and I do not want to "manually" intervine there? Is there some ADDITIONAL function that is called AFTER do_install_append, something like "do_install_post_append"? (if there is such method, then I think it will be the most "elegant" approach in terms of "BitBake inheritence mind set"). – Guy Avraham Jul 18 '23 at 06:53
  • 1
    @GuyAvraham `_append` (or now `:append`) is a special operation and accumulates – ensc Jul 18 '23 at 08:09
  • @ensc - Thanks for the prompt reply! I'm not sure what exactly do you mean by "...and accumulates"? Does it mean that I can have the "original" ("base") recipe have its own `do_install_append` implementation (within `some-recipe.bb` file for example) and ALSO I can "add" to it my `do_install_append` in my "derived" recipe (`some-recipe.bbappend`) and BOTH of them will be executed where the first one is from the `.bb` recipe file and the second is from the `.bbappend` recipe file? – Guy Avraham Jul 18 '23 at 09:59
0

Note that this is actually a bug in your custom library: it shouldn't be installing versioned symlinks for a module.

If you're using libtool to build this then - IIRC - passing -module will stop it versioning.

Guy Avraham
  • 3,482
  • 3
  • 38
  • 50
Ross Burton
  • 3,516
  • 13
  • 12