From 59db12fdf294cfab5c1730337d092a75867658f7 Mon Sep 17 00:00:00 2001 From: Alejandro Enedino Hernandez Samaniego Date: Fri, 7 Dec 2018 17:33:46 -0800 Subject: create_manifest3: Dont match filenames which contain the directory name for new manifest When creating a new python3 manifest, there is a corner case on which the filepath for a certain dependency that was found, could contain the path of an existing folder, e.g. ${libdir}/python3/xmlrpclib.py module path contains ${libdir}/python3/xml, this causes an issue where the dependency doesnt get eventually added on FILES for that module. This patch checks if the dependency that was found is a directory, if it is, it checks if it matches one of the existing directories on the manifest, if it is not, then it checks if the dependency's path (without the filename) matches one of the directories. Signed-off-by: Alejandro Enedino Hernandez Samaniego Signed-off-by: Richard Purdie --- meta/recipes-devtools/python/python3/create_manifest3.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py index f7d4587030..4da02a2991 100644 --- a/meta/recipes-devtools/python/python3/create_manifest3.py +++ b/meta/recipes-devtools/python/python3/create_manifest3.py @@ -310,7 +310,13 @@ for pypkg in old_manifest: pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}') inFolders = False for folder in allfolders: - if folder in pymodule_dep: + # The module could have a directory named after it, e.g. xml, if we take out the filename from the path + # we'll end up with ${libdir}, and we want ${libdir}/xml + if isFolder(pymodule_dep): + check_path = pymodule_dep + else: + check_path = os.path.dirname(pymodule_dep) + if folder in check_path : inFolders = True # Did we find a folder? folderFound = False # Second flag to break inner for # Loop only through packages which contain folders -- cgit 1.2.3-korg