+ def __get_file_from_pool(self, filename, entry, session, logger):
+ cnf = Config()
+
+ if cnf.has_key("Dinstall::SuiteSuffix"):
+ component = cnf["Dinstall::SuiteSuffix"] + entry["component"]
+ else:
+ component = entry["component"]
+
+ poolname = poolify(entry["source"], component)
+ l = get_location(cnf["Dir::Pool"], component, session=session)
+
+ found, poolfile = check_poolfile(os.path.join(poolname, filename),
+ entry['size'],
+ entry["md5sum"],
+ l.location_id,
+ session=session)
+
+ if found is None:
+ if logger is not None:
+ logger.log(["E: Found multiple files for pool (%s) for %s" % (filename, component)])
+ return None
+ elif found is False and poolfile is not None:
+ if logger is not None:
+ logger.log(["E: md5sum/size mismatch for %s in pool" % (filename)])
+ return None
+ else:
+ if poolfile is None:
+ if logger is not None:
+ logger.log(["E: Could not find %s in pool" % (filename)])
+ return None
+ else:
+ return poolfile
+