Author: kkaempf Date: Thu Jan 17 12:04:22 2008 New Revision: 8309 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8309&view=rev Log: - support 'patterns.pat' and 'patterns.pat.gz' to read all patterns in one go. Modified: trunk/libzypp/package/libzypp.changes trunk/libzypp/zypp/parser/susetags/RepoParser.cc trunk/libzypp/zypp/repo/susetags/Downloader.cc Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=8309&r1=8308&r2=8309&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Thu Jan 17 12:04:22 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Jan 17 12:03:10 CET 2008 - kkaempf@suse.de + +- support 'patterns.pat' and 'patterns.pat.gz' to read all + patterns in one go. +- rev 8309 + +------------------------------------------------------------------- Tue Jan 15 14:56:21 CET 2008 - lslezak@suse.cz - added RpmDb::removePubkey(), call it from Modified: trunk/libzypp/zypp/parser/susetags/RepoParser.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/RepoParser.cc?rev=8309&r1=8308&r2=8309&view=diff ============================================================================== --- trunk/libzypp/zypp/parser/susetags/RepoParser.cc (original) +++ trunk/libzypp/zypp/parser/susetags/RepoParser.cc Thu Jan 17 12:04:22 2008 @@ -488,7 +488,16 @@ for ( RepoIndex::FileChecksumMap::const_iterator it = _repoIndex->metaFileChecksums.begin(); it != _repoIndex->metaFileChecksums.end(); ++it ) { - if ( isPatternFile( it->first ) ) + Pathname inputfile; + inputfile = ""; + + if ( it->first == "patterns.pat" + || it->first == "patterns.pat.gz" ) + { + // read all patterns in one go + inputfile = getOptionalFile( _descrdir / it->first, false /*filename already contains .gz */ ); + } + else if ( isPatternFile( it->first ) ) { // *** see also zypp/repo/susetags/Downloader.cc *** @@ -525,16 +534,16 @@ // keep .pat file if it doesn't contain an recognizable arch } } + inputfile = getOptionalFile( _descrdir / it->first, false /*filename already contains .gz */ ); - Pathname inputfile( getOptionalFile( _descrdir / it->first, false /*filename already contains .gz */ ) ); - if ( ! inputfile.empty() ) - { - PatternFileReader reader; - reader.setConsumer( bind( &Impl::consumePat, this, _1 ) ); - CombinedProgressData progress( _ticks, PathInfo(inputfile).size() ); - reader.parse( inputfile, progress ); - } } + if ( ! inputfile.empty() ) + { + PatternFileReader reader; + reader.setConsumer( bind( &Impl::consumePat, this, _1 ) ); + CombinedProgressData progress( _ticks, PathInfo(inputfile).size() ); + reader.parse( inputfile, progress ); + } } // Done Modified: trunk/libzypp/zypp/repo/susetags/Downloader.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/susetags/Downloader.cc?rev=8309&r1=8308&r2=8309&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/susetags/Downloader.cc (original) +++ trunk/libzypp/zypp/repo/susetags/Downloader.cc Thu Jan 17 12:04:22 2008 @@ -120,6 +120,11 @@ } } } + else if ( it->first == "patterns.pat" + || it->first == "patterns.pat.gz" ) + { + // take all patterns in one go + } else if ( str::endsWith( it->first, ".pat" ) || str::endsWith( it->first, ".pat.gz" ) ) { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org