Hello community,

here is the log from the commit of package cmake for openSUSE:Factory checked 
in at 2016-11-16 13:47:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cmake (Old)
 and      /work/SRC/openSUSE:Factory/.cmake.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cmake"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cmake/cmake.changes      2016-10-01 
23:46:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cmake.new/cmake.changes 2016-11-16 
13:47:31.000000000 +0100
@@ -1,0 +2,9 @@
+Tue Nov 15 08:23:14 UTC 2016 - [email protected]
+
+- Fix cmake.prov to report all cmake Config modules provided in a single
+  cmake directory instead of just returning the first one given by a
+  shell glob (which could be different across builds). Also, include
+  upper and lowercase files always instead of including lowercase files
+  only when no uppercase files were found.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
cmake.spec: same change


++++++ cmake.prov ++++++
--- /var/tmp/diff_new_pack.iaWFa2/_old  2016-11-16 13:47:33.000000000 +0100
+++ /var/tmp/diff_new_pack.iaWFa2/_new  2016-11-16 13:47:33.000000000 +0100
@@ -31,35 +31,30 @@
 
         paths = map(lambda x: x.rstrip(), filelist.readlines())
         for path in paths:
-            modulePath, cmakeModule, lowercase = 
self.parseCmakeModuleConfig(path)
-            if modulePath and cmakeModule:
-                version = self.resolveCMakeModuleVersion(modulePath, 
cmakeModule, lowercase)
-
+            for (modulePath, cmakeModule, lowercase) in 
self.parseCmakeModuleConfig(path):
+               version = self.resolveCMakeModuleVersion(modulePath, 
cmakeModule, lowercase)
+       
                 if version:
-                    print("cmake(%s) = %s" % (cmakeModule, version))
+                   print("cmake(%s) = %s" % (cmakeModule, version))
                 else:
-                    print("cmake(%s)" % cmakeModule)
-
+                   print("cmake(%s)" % cmakeModule)
 
     def parseCmakeModuleConfig(self, configFile):
         paths = configFile.rsplit("/", 3)
 
         modulePath = "%s/cmake/%s" % (paths[0], paths[2])
 
-        lowercase = False
-        configFile = glob.glob("%s/*Config.cmake" % modulePath)
-        if not configFile:
-            configFile = glob.glob("%s/*-config.cmake" % modulePath)
-            lowercase = True
-        if not configFile:
-            return (None, None)
-
-        if lowercase:
-            moduleName = configFile[0][len(modulePath) + 
1:-len("-config.cmake")]
-        else:
-            moduleName = configFile[0][len(modulePath) + 
1:-len("Config.cmake")]
+        result = []
+        for configFile in glob.glob("%s/*Config.cmake" % modulePath):
+           moduleName = configFile[len(modulePath) + 1:-len("Config.cmake")]
+           result.append( (modulePath, moduleName, False) )
+
+        for configFile in glob.glob("%s/*-config.cmake" % modulePath):
+           moduleName = configFile[len(modulePath) + 1:-len("-config.cmake")]
+            if (modulePath, moduleName, False) not in result:
+               result.append( (modulePath, moduleName, True) )
 
-        return (modulePath, moduleName, lowercase)
+       return result
 
     def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
         versionFile = ("%s/%s-config-version.cmake" if lowercase else 
"%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)


Reply via email to