[zypp-commit] r6851 - in /trunk/libzypp/zypp: Fetcher.cc FileChecker.cc FileChecker.h
Author: dmacvicar Date: Fri Aug 24 00:38:37 2007 New Revision: 6851 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6851&view=rev Log: Don't lose the checkers when adding jobs. 1sr step to fix checksum and signature blockers Modified: trunk/libzypp/zypp/Fetcher.cc trunk/libzypp/zypp/FileChecker.cc trunk/libzypp/zypp/FileChecker.h Modified: trunk/libzypp/zypp/Fetcher.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Fetcher.cc?rev=6851&r1=6850&r2=6851&view=diff ============================================================================== --- trunk/libzypp/zypp/Fetcher.cc (original) +++ trunk/libzypp/zypp/Fetcher.cc Fri Aug 24 00:38:37 2007 @@ -81,14 +81,16 @@ CompositeFileChecker composite; composite.add(ChecksumFileChecker(resource.checksum())); composite.add(checker); - enqueue(resource, composite); + FetcherJob job(resource); + job.checkers = composite; + _resources.push_back(job); } void Fetcher::Impl::enqueue( const OnMediaLocation &resource, const FileChecker &checker ) { FetcherJob job(resource); job.checkers.add(checker); - _resources.push_back(resource); + _resources.push_back(job); } void Fetcher::Impl::reset() @@ -189,6 +191,7 @@ Pathname localfile = dest_dir + (*it_res).location.filename(); // call the checker function try { + MIL << "Checking " << localfile << endl; (*it_res).checkers(localfile); } catch ( const FileCheckException &e ) Modified: trunk/libzypp/zypp/FileChecker.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/FileChecker.cc?rev=6851&r1=6850&r2=6851&view=diff ============================================================================== --- trunk/libzypp/zypp/FileChecker.cc (original) +++ trunk/libzypp/zypp/FileChecker.cc Fri Aug 24 00:38:37 2007 @@ -69,15 +69,20 @@ void CompositeFileChecker::operator()(const Pathname &file ) const { + MIL << _checkers.size() << " checkers" << endl; for ( list<FileChecker>::const_iterator it = _checkers.begin(); it != _checkers.end(); ++it ) - { + { + MIL << "checking..." << endl; (*it)(file); } } void CompositeFileChecker::add( const FileChecker &checker ) { + //MIL << "||# " << _checkers.size() << endl; _checkers.push_back(checker); + //MIL << "||* " << _checkers.size() << endl; + } SignatureFileChecker::SignatureFileChecker( const Pathname &signature ) Modified: trunk/libzypp/zypp/FileChecker.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/FileChecker.h?rev=6851&r1=6850&r2=6851&view=diff ============================================================================== --- trunk/libzypp/zypp/FileChecker.h (original) +++ trunk/libzypp/zypp/FileChecker.h Fri Aug 24 00:38:37 2007 @@ -145,6 +145,8 @@ * \throws FileCheckException if validation fails */ void operator()( const Pathname &file ) const; + + int checkersSize() const { return _checkers.size(); } private: std::list<FileChecker> _checkers; }; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
dmacvicar@svn.opensuse.org