1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

recipetool: create: split guess_license function

The npm recipetool handler redefines the license code the could be
unified. In order to do this refactoring, extract the bits we'll
need into separate functions.

guess_license() is renamed to find_licenses() and is split into
find_license_files() and match_licenses().

(From OE-Core rev: f1ec28feaea8ea6a2df894dd4ddba561c8a04ed2)

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Enguerrand de Ribaucourt
2024-08-12 14:28:28 +02:00
committed by Richard Purdie
parent 01d17cd5d4
commit 69bf37a3dd
5 changed files with 31 additions and 20 deletions
@@ -1068,6 +1068,7 @@ class RecipetoolTests(RecipetoolBase):
d = DataConnectorCopy
d.getVar = Mock(return_value=commonlicdir)
d.expand = Mock(side_effect=lambda x: x)
srctree = tempfile.mkdtemp(prefix='recipetoolqa')
self.track_for_cleanup(srctree)