302 def __buildRepository(self):
303 msg = self.msg
304 self.dsoFiles =
set()
305 dsoPath = [p
for p
in self.dsoPath.
split( os.pathsep )
306 if not p.startswith(os.environ['ROOTSYS'])]
307 for path in dsoPath:
308 if not os.path.exists(path): continue
309 dir_content = None
310 try:
311 dir_content = os.listdir(path)
312 except Exception:
313
314 try:
315 dir_content = os.listdir(path)
316 except Exception as err:
317 msg.warning("caught:\n%s", err)
318 if dir_content is None:
319 msg.warning("could not run os.listdir on [%s]", path)
320 dir_content = []
321 dsoFiles = [ f for f in dir_content
322 if f.endswith(self.RootMap) ]
323 for dsoFile in dsoFiles:
324 dsoFile = os.path.join( path, dsoFile )
325 if os.path.exists(dsoFile):
326 line_nbr = -1
327 self.dsoFiles.
add(dsoFile)
328 for line in open(dsoFile, 'r'):
329 line_nbr += 1
330 line = line.strip()
331 if len(line) <= 0 or line[0] == "#":
332 continue
333 line = line.split()
334
335
336
337 try:
338 dsoKey, libName = line[0], line[1]
339 except Exception as err:
340 msg.warning(
341 'could not parse %s:%i', dsoFile, line_nbr
342 )
343 msg.warning(
344 '(some) reflex-dicts may fail to be auto-loaded'
345 )
346 msg.warning(err)
347 continue
348 dsoKey = dsoKey\
353 if dsoKey.startswith( self.PluginNamespace ):
354 db = self.pf
355 else:
356 db = self.db
357 if dsoKey not in db: db[dsoKey] = list()
358 if _is_rootcint_dict (libName):
359
360 continue
361 libName = os.path.join(path, _libName(libName))
362 db[dsoKey].append(libName)
363 pass
364 pass
365 pass
366 return
367
bool add(const std::string &hname, TKey *tobj)
std::string replace(std::string s, const std::string &s2, const std::string &s3)
std::vector< std::string > split(const std::string &s, const std::string &t=":")