static int do_download(const symboldb_options &opt, database &db, const char *url) { fd_sink out(1); copy_source_to_sink(*download(opt.download(), db, url), out); return 0; }
static int do_show_primary(const symboldb_options &opt, database &db, const char *base) { repomd rp; rp.acquire(opt.download(), db, base); repomd::primary_xml primary(rp, opt.download_always_cache(), db); fd_sink out(STDOUT_FILENO); copy_source_to_sink(primary, out); return 0; }
static int do_show_repomd(const symboldb_options &opt, database &db, const char *base) { repomd rp; rp.acquire(opt.download(), db, base); printf("revision: %s\n", rp.revision.c_str()); for (std::vector<repomd::entry>::iterator p = rp.entries.begin(), end = rp.entries.end(); p != end; ++p) { std::string entry_url(url_combine_yum(rp.base_url.c_str(), p->href.c_str())); printf("entry: %s %s\n", p->type.c_str(), entry_url.c_str()); } return 0; }