Skip to content

Integrate meta-seco-rk/auto_patch_update

Commit: https://git.seco.com/edgehog/layers/seco/meta-seco-rk/-/commit/f3afce79647c25aa72835d9c2d3258d261d1e490

[BBCLASS][AUTO-PATCH] Manage of folder that does not exist

At the moment, if the variable PATCHPATH contains a path of a folder that does not extst, the loop used to add all the patch from all the folder listed int PATCHPATH ends with a retun call. Now the not existing folder is simply ignored and the loop continues with the other folder(s) of the list.

--

Commit: https://git.seco.com/edgehog/layers/seco/meta-seco-rk/-/commit/ff25dd1b8a99178013a420ac44cc5d5ae4d2b7c3

[BBCLASS][AUTO-PATCH] Allow multiple patch source folders

At the moment, the bbclass auto-path allow to declare a specific folder in which there is/are patch(s) to automatically include to a recipe that inherit this class, without explicitly list that/those patch(e) into SRC_URI file.

This is useful because other patch(s) can be added to the recipes only putting it/them into the declared folder, without changing the bb/bbappend file.

But there is a limitation: only one folder can be declared as patch source. 

This is a limitation because the situation has arisen that there are multiple meta layers that contain the bbappend of a recipe that inherits the auto-patch class. In this condition, only one meta layer can contain the patch folder source; but in the situation that occurred, all layers have to contain patches to be applied.

Solution: the variable PATCHPATH contain the path of the patch source folder. The solution is to convert this variable from a string to a vector of strings (vector of paths). In this way all patches, coming from those different folders, will be grouped together into SRC_URI variable, at runtime.

Note: since this solution uses PATCHPATH as list of paths, the list, itself, implicitly defines an order of with the patches will be applied. The application order is from the head to the tail of the folder list, and for each folder all files are shorted by its name.

Let explain the operation with the following example:

Folder1 |__ patch_b1 |__ patch_b2

Folder2 |__ patch_a1

Folder3 |__ patch_c1 |__ patch_c2 |__ patch_c3

in a meta layer with lowest priority PATCHPATH: = " Folder2 "

in a meta layer with middle priority PATCHPATH:append = " Folder3 "

in a meta layer with highest priority PATCHPATH:prepend = " Folder1 "


At runtime, the order in applying the patches is:

patch_b1 patch_b2 patch_a1 patch_c1 patch_c2 patch_c3

Merge request reports

Loading