Changeset View
Changeset View
Standalone View
Standalone View
helpers/create-abi-dump.py
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 140 | def runCMake(self, runtimeEnvironment) -> None: | |||
---|---|---|---|---|---|
195 | 195 | | |||
196 | # Process the various targets our parser found | 196 | # Process the various targets our parser found | ||
197 | for t, value in self.__parser_output["targets"].items(): | 197 | for t, value in self.__parser_output["targets"].items(): | ||
198 | # Particularly, we want to extract: | 198 | # Particularly, we want to extract: | ||
199 | # Library names (sonames) | 199 | # Library names (sonames) | ||
200 | # The path to the CMake library package | 200 | # The path to the CMake library package | ||
201 | # Any include directories specified by the CMake library package | 201 | # Any include directories specified by the CMake library package | ||
202 | try: | 202 | try: | ||
203 | relib= re.match("^(?P<name>.*)\.so\.(?P<SONAME>.*)$", value["IMPORTED_SONAME_DEBUG"][0]) | 203 | relib= re.match("^(?P<name>.*)\.so(\.(?P<SONAME>.*))?$", value["IMPORTED_SONAME_DEBUG"][0]) | ||
204 | if not relib.group("SONAME"): | ||||
bcooksley: Won't this still fail, as it will still continue to line 207? | |||||
nope relib.group("SONAME") will be None in that case, but this is valid content for line 207. The issue before was that the complete regex does not match the case "libFoo.so" and than relib was None. Now the regex matches and relib is a valid match. And I tested this patch for kded master and it does not break the build anymore. Still failing to create an ABI dump, as no headers are exported, but that is a different story. knauss: nope relib.group("SONAME") will be None in that case, but this is valid content for line 207. | |||||
205 | logging.warning('%s has no SONAME (maybe only a internal library?)', value["IMPORTED_SONAME_DEBUG"][0]) | ||||
206 | | ||||
204 | target = { | 207 | target = { | ||
205 | "SONAME": relib.group("SONAME"), | 208 | "SONAME": relib.group("SONAME"), | ||
206 | "path": value["IMPORTED_LOCATION_DEBUG"][0], | 209 | "path": value["IMPORTED_LOCATION_DEBUG"][0], | ||
207 | "include_dirs": parseIncludeDirs(value["INTERFACE_INCLUDE_DIRECTORIES"]), | 210 | "include_dirs": parseIncludeDirs(value["INTERFACE_INCLUDE_DIRECTORIES"]), | ||
208 | } | 211 | } | ||
209 | self.targets[relib.group("name")]=target | 212 | self.targets[relib.group("name")]=target | ||
210 | except IndexError: | 213 | except IndexError: | ||
211 | pass | 214 | pass | ||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |
Won't this still fail, as it will still continue to line 207?