[oe-commits] [openembedded-core] 01/02: create_manifest2: Dont match filenames which contain the directory name for new manifest

git at git.openembedded.org git at git.openembedded.org
Mon Dec 10 20:47:40 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 370e59499948c254de25a195a63071723b00dc33
Author: Alejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego at xilinx.com>
AuthorDate: Fri Dec 7 17:31:56 2018 -0800

    create_manifest2: Dont match filenames which contain the directory name for new manifest
    
    When creating a new python2 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}/python2.7/xmlrpclib.py
    module path contains ${libdir}/python2.7/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.
    
    Also some misc indentation fixes.
    
    Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr at xilinx.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../python/python/create_manifest2.py              | 28 +++++++++++++---------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-devtools/python/python/create_manifest2.py b/meta/recipes-devtools/python/python/create_manifest2.py
index b674865..3465951 100644
--- a/meta/recipes-devtools/python/python/create_manifest2.py
+++ b/meta/recipes-devtools/python/python/create_manifest2.py
@@ -209,7 +209,13 @@ for key in old_manifest:
 
             inFolders=False
             for folder in allfolders:
-                if folder in item:
+                # 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(item):
+                    check_path = item
+                else:
+                    check_path = os.path.dirname(item)
+                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
@@ -262,16 +268,16 @@ for key in old_manifest:
                                        new_manifest[key]['rdepends'].append(newkey)
                                     break
                     else:
-                      # Debug
-                      print('Adding %s to %s FILES' % (item, key))
-                      # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
-                      new_manifest[key]['files'].append(item)
-                      if item.endswith('*'):
-                          wildcards.append(item)
-                      if item not in allfiles:
-                          allfiles.append(item)
-                      else:
-                          repeated.append(item)
+                        # Debug
+                        print('Adding %s to %s FILES' % (item, key))
+                        # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+                        new_manifest[key]['files'].append(item)
+                        if item.endswith('*'):
+                            wildcards.append(item)
+                        if item not in allfiles:
+                            allfiles.append(item)
+                        else:
+                            repeated.append(item)
 
 print ('The following files are repeated (contained in more than one package), please check which package should get it:')
 print (repeated)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list