0

I have a Yocto system where I'm running some Chef InSpec scans. Chef InSpec offers a command to check if a package is installed, however, that doesn't work with Yocto (I imagine it would if you'd install a package manager, but I don't want to do that). What would be the best way to check if a certain package is installed on the system?

I know that bitbake can show every package that would be in the built image, but I need to check on the target system. Is there a way I can get this information from bitbake from within a recipe that would just route the output into a file on the rootfs? Or is there a better approach without installing a package manager on the target system?

Brian
  • 117
  • 1
  • 13

1 Answers1

0

Inside the folder tmp/deploy/images/$MACHINE/${IMAGE}/ You should see a file named with manifest extension. It is often named like this : [image-name]-[image-version].manifest"

In this file you will find all packages that are present in your linux image built with Yocto, so packages that will be deployed in your target.

void_brain
  • 642
  • 2
  • 13
  • Thanks, but I need to check the installed packages on the target system, as in I need access to which packages are installed from the running target system, not the host environment, which is why I'm asking how to do this without a package manager on the Yocto system. I thought about writing a recipe to copy the appropriate manifest file over, but according to https://stackoverflow.com/questions/52054642/how-to-access-the-build-target-name-in-bitbake it isn't trivial to get the image name in a variable for a recipe. – Brian Feb 08 '23 at 20:49