def check_and_get_file(rpath, lpath, md5, quick): package = os.path.basename(lpath) result = check_file(lpath, md5, quick=quick) if result != 'ok': get_file(rpath, lpath, result) else: debug(result, '\t\t', package)
def sync_section(self, section): missing, corrupt = self.diff[section] for path in missing: lpath = pjoin(self.local.source.root, path) url = pjoin(self.source.root, path) get_file(url, lpath, 'missing') for path in corrupt: lpath = pjoin(self.local.source.root, path) url = pjoin(self.source.root, path) get_file(url, lpath, 'corrupt')
def update_sourcelist(self): self._update_packagelist_(filename='Sources.gz') self.check_sources('_default_', False) missing, corrupt = self.diff['_default_'] for path in missing: lpath = pjoin(self.local.source.root, self.local.source.suite, path) url = pjoin(self.source.root, self.source.suite, path) get_file(url, lpath, 'missing') for path in corrupt: lpath = pjoin(self.local.source.root, self.local.source.suite, path) url = pjoin(self.source.root, self.source.suite, path) get_file(url, lpath, 'corrupt')
def update_sourcelist(self): self._update_packagelist_(filename="Sources.gz") self.check_sources("_default_", False) missing, corrupt = self.diff["_default_"] for path in missing: lpath = pjoin(self.local.source.root, self.local.source.suite, path) url = pjoin(self.source.root, self.source.suite, path) get_file(url, lpath, "missing") for path in corrupt: lpath = pjoin(self.local.source.root, self.local.source.suite, path) url = pjoin(self.source.root, self.source.suite, path) get_file(url, lpath, "corrupt")