简体   繁体   中英

Yocto: bitbake command to regenerate all RPM files

I wanted to make some free space and deleted all directories in build/tmp/deploy/rpm/, thinking yocto would detect it and recreate them at the next bitbake call... it was a mistake ! :(

Here's the bitbake error just in case:

bitbake <image_name>
[...]
ERROR: ... do_rootfs: minicom not found in the base feeds (<image_name> corei7-64-intel-common corei7-64 core2-64 x86_64 noarch any all).
[...list of every package...]

Is there any way to force the regeneration of every rpms using bitbake ? Forcing the regeneration with bitbake -f -c package_write_rpm <package> works, but I didn't find the command to do it all at once.

I tried cleaning the state of the native rpm packages thinking it might detect it and invalidate the rpm files states, but no luck:

bitbake -f -c cleanall nativesdk-rpm nativesdk-rpmresolve rpmresolve-native rpm-native
bitbake <image_name>

I also thought this would work, but it didn't:

bitbake -f -c package_write_rpm <image_name>

I will try to hack something with bitbake-layers show-recipes and xargs , but it would be cool to have a proper bitbake command.

I am using Yocto 2.1 (Krogoth).

Thanks !

I ended up doing the following script and use bitbake dependency tree to get the list of packages (thanks to this yocto/bitbake reference page ):

# bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq | grep -v "}" | grep -v cross | grep -v gcc | grep -v glibc > packages-list.txt
# cat packages-list.txt | xargs bitbake -f -c package_write_rpm

Maybe there is a more straightforward solution ? For now this worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM