Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at Tue Jul 19 13:53:16 CEST 2011.
-------- --- libzypp/libzypp.changes 2011-07-07 16:16:36.000000000 +0200 +++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes 2011-07-18 12:42:41.000000000 +0200 @@ -1,0 +2,18 @@ +Mon Jul 18 11:33:25 CEST 2011 - [email protected] + +- More initialize parser structure fixes. (bnc#705181) +- version 9.8.7 (8) + +------------------------------------------------------------------- +Fri Jul 15 15:15:01 CEST 2011 - [email protected] + +- Check for /etc/sysconfig/storage changes before solving (bnc#702365) +- version 9.8.6 (8) + +------------------------------------------------------------------- +Fri Jul 15 13:58:53 CEST 2011 - [email protected] + +- Properly initialize parser structures (bnc#705181) +- version 9.8.5 (8) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libzypp-9.8.4.tar.bz2 New: ---- libzypp-9.8.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.OJnGqO/_old 2011-07-19 13:50:00.000000000 +0200 +++ /var/tmp/diff_new_pack.OJnGqO/_new 2011-07-19 13:50:00.000000000 +0200 @@ -23,7 +23,7 @@ Group: System/Packages BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Package, Patch, Pattern, and Product Management -Version: 9.8.4 +Version: 9.8.7 Release: 1 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc ++++++ libzypp-9.8.4.tar.bz2 -> libzypp-9.8.7.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/VERSION.cmake new/libzypp-9.8.7/VERSION.cmake --- old/libzypp-9.8.4/VERSION.cmake 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/VERSION.cmake 2011-07-18 12:39:35.000000000 +0200 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "9") SET(LIBZYPP_COMPATMINOR "8") SET(LIBZYPP_MINOR "8") -SET(LIBZYPP_PATCH "4") +SET(LIBZYPP_PATCH "7") # -# LAST RELEASED: 9.8.4 (8) +# LAST RELEASED: 9.8.7 (8) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/package/libzypp.changes new/libzypp-9.8.7/package/libzypp.changes --- old/libzypp-9.8.4/package/libzypp.changes 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/package/libzypp.changes 2011-07-18 12:39:35.000000000 +0200 @@ -1,4 +1,22 @@ ------------------------------------------------------------------- +Mon Jul 18 11:33:25 CEST 2011 - [email protected] + +- More initialize parser structure fixes. (bnc#705181) +- version 9.8.7 (8) + +------------------------------------------------------------------- +Fri Jul 15 15:15:01 CEST 2011 - [email protected] + +- Check for /etc/sysconfig/storage changes before solving (bnc#702365) +- version 9.8.6 (8) + +------------------------------------------------------------------- +Fri Jul 15 13:58:53 CEST 2011 - [email protected] + +- Properly initialize parser structures (bnc#705181) +- version 9.8.5 (8) + +------------------------------------------------------------------- Thu Jul 7 15:53:17 CEST 2011 - [email protected] - Fix tests for available libcurl version. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/media/MediaBlockList.cc new/libzypp-9.8.7/zypp/media/MediaBlockList.cc --- old/libzypp-9.8.4/zypp/media/MediaBlockList.cc 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/media/MediaBlockList.cc 2011-07-18 12:39:36.000000000 +0200 @@ -44,9 +44,7 @@ MediaBlockList::addBlock(off_t off, size_t size) { haveblocks = true; - blocks.push_back(MediaBlock()); - blocks.back().off = off; - blocks.back().size = size; + blocks.push_back(MediaBlock( off, size )); return blocks.size() - 1; } @@ -350,7 +348,7 @@ } int oc = buf[i]; buf[i] = c; - a += c - oc; + a += c - oc; if (bshift) b += a - (oc << bshift); else @@ -370,7 +368,7 @@ r = ((unsigned int)a & 255) << 16 | ((unsigned int)b & 65535); else r = ((unsigned int)a & 65535) << 16 | ((unsigned int)b & 65535); - unsigned int h = r & hm; + unsigned int h = r & hm; unsigned int hh = 7; for (; ht[h]; h = (h + hh++) & hm) { @@ -466,7 +464,7 @@ std::vector<MediaBlock> nblocks; std::vector<unsigned char> nchksums; std::vector<unsigned int> nrsums; - + for (size_t blkno = 0; blkno < blocks.size(); ++blkno) { if (!found[blkno]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/media/MediaBlockList.h new/libzypp-9.8.7/zypp/media/MediaBlockList.h --- old/libzypp-9.8.4/zypp/media/MediaBlockList.h 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/media/MediaBlockList.h 2011-07-18 12:39:36.000000000 +0200 @@ -24,6 +24,10 @@ * a single block from the blocklist, consisting of an offset and a size **/ struct MediaBlock { + MediaBlock( off_t off_r, size_t size_r ) + : off( off_r ) + , size( size_r ) + {} off_t off; size_t size; }; @@ -103,7 +107,7 @@ inline bool haveRsum(size_t blkno) const { return rsumlen && rsums.size() >= blkno + 1; } - + /** * scan a file for blocks from our blocklist. if we find a suitable block, * it is removed from the list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/media/MediaMultiCurl.cc new/libzypp-9.8.7/zypp/media/MediaMultiCurl.cc --- old/libzypp-9.8.4/zypp/media/MediaMultiCurl.cc 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/media/MediaMultiCurl.cc 2011-07-18 12:39:36.000000000 +0200 @@ -720,7 +720,7 @@ else { MediaBlock blk = blklist->getBlock(_request->_blkno); - while (_request->_blkoff >= blk.off + blk.size) + while (_request->_blkoff >= (off_t)(blk.off + blk.size)) { if (++_request->_blkno == blklist->numBlocks()) { @@ -850,7 +850,7 @@ break; } - if (_activeworkers < _maxworkers && urliter != urllist.end() && _workers.size() < MAXURLS) + if ((int)_activeworkers < _maxworkers && urliter != urllist.end() && _workers.size() < MAXURLS) { // spawn another worker! multifetchworker *worker = new multifetchworker(workerno++, *this, *urliter); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/media/MetaLinkParser.cc new/libzypp-9.8.7/zypp/media/MetaLinkParser.cc --- old/libzypp-9.8.4/zypp/media/MetaLinkParser.cc 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/media/MetaLinkParser.cc 2011-07-18 12:39:36.000000000 +0200 @@ -79,11 +79,59 @@ }; struct ml_url { + ml_url() + : priority( 0 ) + {} int priority; string url; }; -struct ml_parsedata { +static void XMLCALL startElement(void *userData, const char *name, const char **atts); +static void XMLCALL endElement(void *userData, const char *name); +static void XMLCALL characterData(void *userData, const XML_Char *s, int len); + +struct ml_parsedata : private zypp::base::NonCopyable { + ml_parsedata() + : parser( XML_ParserCreate(NULL) ) + , depth( 0 ) + , state( STATE_START ) + , statedepth( 0 ) + , content( reinterpret_cast<char *>(malloc(256)) ) + , lcontent( 0 ) + , acontent( 256 ) + , docontent( 0 ) + , called( 0 ) + , gotfile( 0 ) + , size( -1 ) + , nurls( 0 ) + , blksize( 0 ) + , npiece( 0 ) + , piecel( 0 ) + , nsha1( 0 ) + , nzsync( 0 ) + , chksuml( 0 ) + { + struct stateswitch *sw; + int i; + memset( swtab, 0, sizeof(swtab) ); + memset( sbtab, 0, sizeof(sbtab) ); + for (i = 0, sw = stateswitches; sw->from != NUMSTATES; i++, sw++) + { + if (!swtab[sw->from]) + swtab[sw->from] = sw; + sbtab[sw->to] = sw->from; + } + XML_SetUserData(parser, this); + XML_SetElementHandler(parser, startElement, endElement); + XML_SetCharacterDataHandler(parser, characterData); + } + + ~ml_parsedata() + { + XML_ParserFree(parser); + free(content); + } + XML_Parser parser; int depth; enum state state; @@ -357,31 +405,11 @@ MetaLinkParser::MetaLinkParser() -{ - struct stateswitch *sw; - int i; - - pd = new ml_parsedata(); - pd->size = off_t(-1); - for (i = 0, sw = stateswitches; sw->from != NUMSTATES; i++, sw++) - { - if (!pd->swtab[sw->from]) - pd->swtab[sw->from] = sw; - pd->sbtab[sw->to] = sw->from; - } - pd->content = reinterpret_cast<char *>(malloc(256)); - pd->acontent = 256; - pd->lcontent = 0; - pd->parser = XML_ParserCreate(NULL); - XML_SetUserData(pd->parser, pd); - XML_SetElementHandler(pd->parser, startElement, endElement); - XML_SetCharacterDataHandler(pd->parser, characterData); -} + : pd( new ml_parsedata ) +{} MetaLinkParser::~MetaLinkParser() { - XML_ParserFree(pd->parser); - free(pd->content); delete pd; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/sat/Pool.cc new/libzypp-9.8.7/zypp/sat/Pool.cc --- old/libzypp-9.8.4/zypp/sat/Pool.cc 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/sat/Pool.cc 2011-07-18 12:39:36.000000000 +0200 @@ -45,6 +45,9 @@ void Pool::prepare() const { return myPool().prepare(); } + void Pool::prepareForSolving() const + { return myPool().prepareForSolving(); } + bool Pool::reposEmpty() const { return ! myPool()->nrepos; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/sat/Pool.h new/libzypp-9.8.7/zypp/sat/Pool.h --- old/libzypp-9.8.4/zypp/sat/Pool.h 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/sat/Pool.h 2011-07-18 12:39:36.000000000 +0200 @@ -65,6 +65,9 @@ /** Update housekeeping data if necessary (e.g. whatprovides). */ void prepare() const; + /** \ref prepare plus some expensive checks done before solving only. */ + void prepareForSolving() const; + public: /** Whether \ref Pool contains repos. */ bool reposEmpty() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/sat/Transaction.h new/libzypp-9.8.7/zypp/sat/Transaction.h --- old/libzypp-9.8.4/zypp/sat/Transaction.h 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/sat/Transaction.h 2011-07-18 12:39:36.000000000 +0200 @@ -23,7 +23,6 @@ #include "zypp/base/Iterator.h" #include "zypp/base/DefaultIntegral.h" -#include "zypp/sat/detail/PoolImpl.h" #include "zypp/sat/SolvIterMixin.h" #include "zypp/sat/Solvable.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/sat/detail/PoolImpl.cc new/libzypp-9.8.7/zypp/sat/detail/PoolImpl.cc --- old/libzypp-9.8.4/zypp/sat/detail/PoolImpl.cc 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/sat/detail/PoolImpl.cc 2011-07-18 12:39:36.000000000 +0200 @@ -82,6 +82,13 @@ return _val; } + const Pathname & sysconfigStoragePath() + { + static const Pathname _val( "/etc/sysconfig/storage" ); + return _val; + } + + ///////////////////////////////////////////////////////////////// static void logSat( struct _Pool *, void *data, int type, const char *logString ) @@ -131,15 +138,7 @@ case NAMESPACE_FILESYSTEM: { - static const Pathname sysconfigStoragePath( "/etc/sysconfig/storage" ); - static WatchFile sysconfigFile( sysconfigStoragePath, WatchFile::NO_INIT ); - static std::set<std::string> requiredFilesystems; - if ( sysconfigFile.hasChanged() ) - { - requiredFilesystems.clear(); - str::split( base::sysconfig::read( sysconfigStoragePath )["USED_FS_LIST"], - std::inserter( requiredFilesystems, requiredFilesystems.end() ) ); - } + const std::set<std::string> & requiredFilesystems( reinterpret_cast<PoolImpl*>(data)->requiredFilesystems() ); return requiredFilesystems.find( IdString(rhs).asString() ) != requiredFilesystems.end() ? RET_systemProperty : RET_unsupported; } break; @@ -237,7 +236,7 @@ void PoolImpl::prepare() const { - if ( _watcher.remember( _serial ) ) + if ( _watcher.remember( _serial ) ) { // After repo/solvable add/remove: // set pool architecture @@ -246,6 +245,7 @@ if ( ! _pool->whatprovides ) { MIL << "pool_createwhatprovides..." << endl; + ::pool_addfileprovides( _pool ); ::pool_createwhatprovides( _pool ); } @@ -256,6 +256,19 @@ } } + void PoolImpl::prepareForSolving() const + { + // additional /etc/sysconfig/storage check: + static WatchFile sysconfigFile( sysconfigStoragePath(), WatchFile::NO_INIT ); + if ( sysconfigFile.hasChanged() ) + { + _requiredFilesystemsPtr.reset(); // recreated on demand + const_cast<PoolImpl*>(this)->depSetDirty( "/etc/sysconfig/storage change" ); + } + // finally prepare as usual: + prepare(); + } + /////////////////////////////////////////////////////////////////// ::_Repo * PoolImpl::_createRepo( const std::string & name_r ) @@ -599,6 +612,18 @@ MIL << "onSystemByUserList found: " << onSystemByUserList.size() << endl; } + const std::set<std::string> & PoolImpl::requiredFilesystems() const + { + if ( ! _requiredFilesystemsPtr ) + { + _requiredFilesystemsPtr.reset( new std::set<std::string> ); + std::set<std::string> & requiredFilesystems( *_requiredFilesystemsPtr ); + str::split( base::sysconfig::read( sysconfigStoragePath() )["USED_FS_LIST"], + std::inserter( requiredFilesystems, requiredFilesystems.end() ) ); + } + return *_requiredFilesystemsPtr; + } + ///////////////////////////////////////////////////////////////// } // namespace detail /////////////////////////////////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/sat/detail/PoolImpl.h new/libzypp-9.8.7/zypp/sat/detail/PoolImpl.h --- old/libzypp-9.8.4/zypp/sat/detail/PoolImpl.h 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/sat/detail/PoolImpl.h 2011-07-18 12:39:36.000000000 +0200 @@ -67,6 +67,8 @@ * \todo actually requires a watcher. */ void prepare() const; + /** \ref prepare plus some expensive checks done before solving only. */ + void prepareForSolving() const; private: /** Invalidate housekeeping data (e.g. whatprovides) if the @@ -261,6 +263,10 @@ } //@} + public: + /** accessor for etc/sysconfig/storage reading file on demand */ + const std::set<std::string> & requiredFilesystems() const; + private: /** sat-pool. */ ::_Pool * _pool; @@ -283,6 +289,9 @@ /** */ void onSystemByUserListInit() const; mutable scoped_ptr<OnSystemByUserList> _onSystemByUserListPtr; + + /** filesystems mentioned in /etc/sysconfig/storage */ + mutable scoped_ptr<std::set<std::string> > _requiredFilesystemsPtr; }; /////////////////////////////////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-9.8.4/zypp/solver/detail/SATResolver.cc new/libzypp-9.8.7/zypp/solver/detail/SATResolver.cc --- old/libzypp-9.8.4/zypp/solver/detail/SATResolver.cc 2011-07-07 16:12:55.000000000 +0200 +++ new/libzypp-9.8.7/zypp/solver/detail/SATResolver.cc 2011-07-18 12:39:36.000000000 +0200 @@ -442,7 +442,7 @@ _solv->distupgrade = _distupgrade; _solv->distupgrade_removeunsupported = _distupgrade_removeunsupported; - sat::Pool::instance().prepare(); + sat::Pool::instance().prepareForSolving(); // Solve ! MIL << "Starting solving...." << endl; @@ -826,7 +826,7 @@ _solv->distupgrade = _distupgrade; _solv->distupgrade_removeunsupported = _distupgrade_removeunsupported; - sat::Pool::instance().prepare(); + sat::Pool::instance().prepareForSolving(); // Solve ! MIL << "Starting solving for update...." << endl; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
