def _get_packages_file(self, repos): if repos.source.has_release(): repos.update() else: rpath = os.path.join(repos.source.uri, repos.source.suite, 'Packages.gz') # the [5:] slice is to remove file: from local uri lpath = os.path.join(repos.local.source.uri, repos.source.suite, 'Packages.gz')[5:] if not os.path.isfile(lpath): debug('lpath is --->', lpath) makepaths(os.path.dirname(lpath)) debug(rpath, lpath, 'getting now') wget(rpath, lpath)
def update_local_packagelist(repos, localdist, localsuite): repos.source.sections = [] repos.local.source.sections = [] update_remote_uri(repos, localdist) repos.source.suite = localsuite repos.local.source.suite = localsuite rurl = os.path.join(repos.source.uri, repos.source.suite, 'Packages.gz') lpath = os.path.join(repos.local.source.uri, repos.local.source.suite, 'Packages.gz')[5:] makepaths(os.path.dirname(lpath)) if not os.path.isfile(lpath): print rurl, lpath, 'rurl, lpath' wget(rurl, lpath)