26 using namespace zypp::xml;
27 using namespace zypp::parser::yum;
36 Downloader::Downloader(
const RepoInfo &repoinfo ,
const Pathname &delta_dir)
37 : repo::
Downloader(repoinfo), _delta_dir(delta_dir), _media_ptr(0L)
50 const Pathname & prefix)
52 if (prefix.empty() || prefix ==
"/")
64 if (!PathInfo(dir).isDir())
66 string base = file.basename();
67 size_t hypoff = base.find(
"-");
68 if (hypoff != string::npos)
69 base.replace(0, hypoff + 1,
"");
70 size_t basesize = base.size();
71 std::list<Pathname> retlist;
74 for_( it, retlist.begin(), retlist.end() )
76 string fn = it->asString();
77 if (fn.size() >= basesize && fn.substr(fn.size() - basesize, basesize) == base)
88 MIL <<
id <<
" : " << loc_with_path << endl;
97 MIL << dtype <<
" : " << loc_with_path << endl;
103 MIL <<
"Skipping other.xml" << endl;
109 MIL <<
"Skipping filelists.xml.gz" << endl;
130 const Pathname &dest_dir,
133 Pathname repomdpath =
repoInfo().
path() +
"/repodata/repomd.xml";
134 Pathname keypath =
repoInfo().
path() +
"/repodata/repomd.xml.key";
135 Pathname sigpath =
repoInfo().
path() +
"/repodata/repomd.xml.asc";
140 progress.
sendTo(progressrcv);
147 #warning Do we need SignatureFileChecker(string descr)?
153 if ( PathInfo(dest_dir / sigpath).isExist() )
163 if ( PathInfo(dest_dir / keypath).isExist() )
172 if ( ! progress.
tick() )
176 WAR <<
"Signature checking disabled in config of repository " <<
repoInfo().
alias() << endl;
182 if ( ! progress.
tick() )
187 Reader reader( dest_dir +
repoInfo().path() +
"/repodata/repomd.xml" );