21 using namespace zypp::parser;
22 using namespace zypp::parser::susetags;
31 Downloader::Downloader(
const RepoInfo &repoinfo,
const Pathname &delta_dir )
32 : repo::
Downloader(repoinfo), _delta_dir(delta_dir)
48 Pathname deltafile(dir + file.basename());
49 if (PathInfo(deltafile).isExist())
57 const Pathname &dest_dir,
62 Pathname masterIndex(
repoInfo().path() /
"/content" );
67 Pathname inputfile( dest_dir / masterIndex );
70 content.
parse( inputfile );
83 WAR <<
"No signing keys defined." << endl;
90 std::map<std::string,RepoIndex::FileChecksumMap::const_iterator> availablePackageTranslations;
97 static const str::regex rx_packages(
"^packages((.gz)?|(.([^.]*))(.gz)?)$" );
105 else if ( what[4] ==
"FL" )
110 availablePackageTranslations[what[4]] = it;
117 else if ( it->first ==
"patterns.pat"
118 || it->first ==
"patterns.pat.gz" )
132 std::vector<std::string> patparts;
133 unsigned archpos = 2;
135 unsigned count =
str::split( it->first, std::back_inserter(patparts),
"." );
136 if ( patparts[count-1] ==
"gz" )
139 if ( count > archpos )
143 Arch patarch( patparts[count-archpos] );
147 MIL <<
"Discarding pattern " << it->first << endl;
153 WAR <<
"Pattern file name does not contain recognizable architecture: " << it->first << endl;
158 MIL <<
"adding job " << it->first << endl;
166 auto fnc_checkTransaltions( [&](
const Locale & locale_r ) {
169 auto it( availablePackageTranslations.find( toGet.code() ) );
170 if ( it != availablePackageTranslations.end() )
172 auto mit( it->second );
173 MIL <<
"adding job " << mit->first << endl;
183 fnc_checkTransaltions( it );
191 if ( it->first !=
"license.tar.gz" )
194 MIL <<
"adding job " << it->first << endl;
202 MIL <<
"adding job " << it->first << endl;
208 start( dest_dir, media );
213 MIL <<
"Consuming repo index" << endl;