The current developer manual [1] specifies that patches that are part of a directory which is given in SRC_URI are applied by the do_patch task. However that is not implemented in the current code.
This patchset implements that, but deviates from what is documented. If the patches are applied I will send a patch for the documentation changing the relevant part to: ``` If you have a directory full of patch files and you want to apply them all you can add the directory to SRC_URI and add the "apply=yes" parameter. This will apply ALL files in the directiory, including files in subdirectories. The patches will be applied sorted by their filename. Files from subdirectories will be sorted into the list at the position given by the subdirectory name. SRC_URI = " \ git://path_to_repo/some_package \ file://path_to_lots_of_patch_files;apply=yes \ " In the previous example all the files in the directory holding the patch files would be applied as a patch. ``` Changes in v2: - using python glob to get a directories content recursively as proposed by Konrad Weihmann - dropped 'lib/oe/recipeutils.py: follow changed method argument list', the use of glob allowed to keep the original argument list - added a oe-selftest which tests applying patches aspects Max [1] https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#ref-tasks-patch Max Krummenacher (2): lib/oe/patch.py: apply patches from src_uri specified directories oe-selftest: bbtests: add test_patching test .../patchtest/patchtest/0001-10.patch | 25 +++++ .../patchtest/patchtest/0001-111.patch | 25 +++++ .../patchtest/patchtest/expected_source_file | 11 +++ .../patchtest/patchtest/expected_src_patches | 5 + .../patchtest/patchtest/expected_src_sources | 7 ++ .../patchtest/patchset1/0001-11.patch | 25 +++++ .../patchtest/patchset2/0001-2.patch | 25 +++++ .../patchset2/0002_subset1/0001-4.patch | 27 ++++++ .../patchset2/0002_subset1/0002-6.patch | 26 ++++++ .../patchtest/patchset2/0003-8.patch | 25 +++++ .../patchtest/patchset3/0001-111.patch | 25 +++++ .../patchtest/patchtest/src_patches | 5 + .../patchtest/patchtest/the_source_file | 5 + .../recipes-test/patchtest/patchtest_1.0.bb | 37 ++++++++ meta/lib/oe/patch.py | 92 +++++++++++-------- meta/lib/oeqa/selftest/cases/bbtests.py | 18 ++++ 16 files changed, 346 insertions(+), 37 deletions(-) create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/0001-10.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/0001-111.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/expected_source_file create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/expected_src_patches create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/expected_src_sources create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/patchset1/0001-11.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/patchset2/0001-2.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/patchset2/0002_subset1/0001-4.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/patchset2/0002_subset1/0002-6.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/patchset2/0003-8.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/patchset3/0001-111.patch create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/src_patches create mode 100644 meta-selftest/recipes-test/patchtest/patchtest/the_source_file create mode 100644 meta-selftest/recipes-test/patchtest/patchtest_1.0.bb -- 2.20.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#159859): https://lists.openembedded.org/g/openembedded-core/message/159859 Mute This Topic: https://lists.openembedded.org/mt/87853564/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-