*
*/
#include <iostream>
-//#include "zypp/base/Logger.h"
+#include "zypp/base/LogTools.h"
#include "zypp/parser/susetags/RepoIndex.h"
IMPL_PTR_TYPE(RepoIndex);
+ std::ostream & RepoIndex::dumpOn( std::ostream & str ) const
+ {
+ return str
+ << "RepoIndex checksums: META files " << metaFileChecksums.size()
+ << ", HASH files " << mediaFileChecksums.size()
+ << ", KEY files " << signingKeys.size();
+ }
+
/////////////////////////////////////////////////////////////////
} // namespace susetags
///////////////////////////////////////////////////////////////////
protected:
/** Overload to realize std::ostream & operator\<\<. */
- //virtual std::ostream & dumpOn( std::ostream & str ) const;
+ virtual std::ostream & dumpOn( std::ostream & str ) const;
};
//////////////////////////////////////////////////////////////////
{
ZYPP_THROW( ParseException( (dest_dir+_path).asString() + ": " + "No repository index in content file." ) );
}
-
+ MIL << "RepoIndex: " << _repoindex << endl;
+ if ( _repoindex->metaFileChecksums.empty() )
+ {
+ ZYPP_THROW( ParseException( (dest_dir+_path).asString() + ": " + "No metadata checksums in content file." ) );
+ }
+ if ( _repoindex->signingKeys.empty() )
+ {
+ WAR << "No signing keys defined." << endl;
+ }
+
// Prepare parsing
descr_dir = _repoindex->descrdir; // path below reporoot
//_datadir = _repoIndex->datadir; // path below reporoot
-
+
+
for ( RepoIndex::FileChecksumMap::const_iterator it = _repoindex->metaFileChecksums.begin();
it != _repoindex->metaFileChecksums.end();
++it )
{
// take all patterns in one go
}
- else if ( str::endsWith( it->first, ".pat" )
+ else if ( str::endsWith( it->first, ".pat" )
|| str::endsWith( it->first, ".pat.gz" ) )
{
location.setChecksum( it->second );
this->enqueueDigested(location);
}
-
+
for ( RepoIndex::FileChecksumMap::const_iterator it = _repoindex->signingKeys.begin();
it != _repoindex->signingKeys.end();
++it )
location.setChecksum( it->second );
this->enqueueDigested(location);
}
-
+
this->start( dest_dir, media );
}