Yocto Project Summit 2024.12

Patching unpatchable files
2024-12-05 , kirkstone

In the Yocto world, the .bbappend file is a well-known and documented mechanism for altering recipe files, and an essential part of daily operations. While not common, there are instances where it becomes necessary to modify other file types, such as .inc or .bbclass, which do not offer an equivalent append mechanism. This session will summarize various strategies for effectively handling these file types when patching cannot be avoided.


In my recent presentation [1] [2] at the Yocto Developer Day in Vienna, I mentioned using the KAS patch mechanism for minor modifications to files like .inc or .bbclass, where the Yocto internal overwriting mechanism via .bbappend files does not apply. Initially intended as a helpful side note on how I navigated a few unique situations, this part quickly escalated into the most discussed segment of the talk. Half of the attendees I spoke with found it valuable, while the other half expressed strong objections.

In this follow-up session, I aim to dive deeper into the complexities of working with these “unpatchable” files and explore the following key questions:

  • In which situations is patching valid?
  • What strategies and approaches —both well-known and lesser-known— are generally available?
  • Which strategy is best suited for different scenarios and use cases?

In conclusion, this talk aims to present and document various strategies for addressing the challenge of “patching unpatchable files” and to encourage discussions on best practices.

[1] https://pretalx.com/ypdd-oss-elce-2024/talk/WUMTQT/
[2] https://www.youtube.com/watch?v=FOYZVjAK51M

See also: Slides (1.6 MB)

Anna-Lena Marx has been working as an Embedded Systems Developer at inovex since 2015 and holds a Master's degree in Embedded Systems. As a hobby, she also studies Electrical Engineering. Professionally, Anna-Lena focuses on the development of Embedded Systems based on Yocto or the AOSP, kernel drivers, IoT, and organizing the Embedded Systems department. She is also involved in Girl's Day to get young girls interested in technical careers.