def create_metalink(self, package_name): args = str("-c %s" % self.conf_file).split() if package_name == "databases": args += ["-y"] else: args += [package_name] args += ["--noconfirm"] args += "-r -p http -l 50".split() try: pargs, conf, download_queue, not_found, missing_deps = pm2ml.build_download_queue(args) except: log.debug(_("Unable to create download queue for package %s") % package_name) return None if not_found: log.debug(_("Warning! Can't find these packages:")) for nf in sorted(not_found): log.debug(nf) if missing_deps: log.debug(_("Warning! Can't resolve these dependencies:")) for md in sorted(missing_deps): log.debug(md) metalink = pm2ml.download_queue_to_metalink( download_queue, output_dir=pargs.output_dir, set_preference=pargs.preference ) return metalink
def create_metalink(self, package_name): args = str("-c %s" % self.conf_file).split() if package_name == "databases": args += ["-y"] else: args += [package_name] args += ["--noconfirm"] args += "-r -p http -l 50".split() try: pargs, conf, download_queue, not_found, missing_deps = pm2ml.build_download_queue( args) except: log.debug( _("Unable to create download queue for package %s") % package_name) return None if not_found: log.debug(_("Warning! Can't find these packages:")) for nf in sorted(not_found): log.debug(nf) if missing_deps: log.debug(_("Warning! Can't resolve these dependencies:")) for md in sorted(missing_deps): log.debug(md) metalink = pm2ml.download_queue_to_metalink( download_queue, output_dir=pargs.output_dir, set_preference=pargs.preference) return metalink
def create_metalink(self, package_name): """ Creates a metalink to download package_name and its dependencies """ args = str("-c %s" % self.conf_file).split() if package_name == "databases": args += ["-y"] else: args += [package_name] args += ["--noconfirm"] args += "-r -p http -l 50".split() try: pargs, conf, download_queue, not_found, missing_deps = pm2ml.build_download_queue( args) except: logging.error(_("Unable to create download queue for package %s"), package_name) return None if not_found: msg = _("Can't find these packages: ") for not_found in sorted(not_found): msg = msg + not_found + " " logging.warning(msg) if missing_deps: msg = _("Warning! Can't resolve these dependencies: ") for missing in sorted(missing_deps): msg = msg + missing + " " logging.warning(msg) metalink = pm2ml.download_queue_to_metalink( download_queue, output_dir=pargs.output_dir, set_preference=pargs.preference) return metalink
def create_metalink(self, package_name): """ Creates a metalink to download package_name and its dependencies """ args = str("-c %s" % self.conf_file).split() if package_name == "databases": args += ["-y"] else: args += [package_name] args += ["--noconfirm"] args += "-r -p http -l 50".split() try: pargs, conf, download_queue, not_found, missing_deps = pm2ml.build_download_queue(args) except: logging.error(_("Unable to create download queue for package %s"), package_name) return None if not_found: msg = _("Can't find these packages: ") for not_found in sorted(not_found): msg = msg + not_found + " " logging.warning(msg) if missing_deps: msg = _("Warning! Can't resolve these dependencies: ") for missing in sorted(missing_deps): msg = msg + missing + " " logging.warning(msg) metalink = pm2ml.download_queue_to_metalink( download_queue, output_dir=pargs.output_dir, set_preference=pargs.preference ) return metalink