Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2014-07-16 16:49:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2014-06-23 11:06:19.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2014-07-16 16:49:19.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Jul 11 13:42:43 CEST 2014 - [email protected] + +- Support RepoInfo content keywords (FATE#316287) +- fix parsing repomd.xml twice +- version 14.25.0 (23) + +------------------------------------------------------------------- Old: ---- libzypp-14.24.0.tar.bz2 New: ---- libzypp-14.25.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.7rQIyd/_old 2014-07-16 16:49:20.000000000 +0200 +++ /var/tmp/diff_new_pack.7rQIyd/_new 2014-07-16 16:49:20.000000000 +0200 @@ -23,7 +23,7 @@ Summary: Package, Patch, Pattern, and Product Management License: GPL-2.0+ Group: System/Packages -Version: 14.24.0 +Version: 14.25.0 Release: 0 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc ++++++ libzypp-14.24.0.tar.bz2 -> libzypp-14.25.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/VERSION.cmake new/libzypp-14.25.0/VERSION.cmake --- old/libzypp-14.24.0/VERSION.cmake 2014-06-11 07:41:17.000000000 +0200 +++ new/libzypp-14.25.0/VERSION.cmake 2014-07-11 13:45:16.000000000 +0200 @@ -60,9 +60,9 @@ # SET(LIBZYPP_MAJOR "14") SET(LIBZYPP_COMPATMINOR "23") -SET(LIBZYPP_MINOR "24") +SET(LIBZYPP_MINOR "25") SET(LIBZYPP_PATCH "0") # -# LAST RELEASED: 14.24.0 (23) +# LAST RELEASED: 14.25.0 (23) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/doc/autoinclude/EnvironmentVariables.doc new/libzypp-14.25.0/doc/autoinclude/EnvironmentVariables.doc --- old/libzypp-14.24.0/doc/autoinclude/EnvironmentVariables.doc 2013-12-04 12:45:42.000000000 +0100 +++ new/libzypp-14.25.0/doc/autoinclude/EnvironmentVariables.doc 2014-07-11 13:45:16.000000000 +0200 @@ -6,7 +6,7 @@ \section zypp-envars-intro Environment Variables -Note that for Boolean variables we usually test whether the variable exists and not for the assigned value. +<b>Note</b> that for Boolean variables we usually test whether the variable exists and not for the assigned value. \subsection zypp-envars-config zypp config options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/package/libzypp.changes new/libzypp-14.25.0/package/libzypp.changes --- old/libzypp-14.24.0/package/libzypp.changes 2014-06-11 07:41:17.000000000 +0200 +++ new/libzypp-14.25.0/package/libzypp.changes 2014-07-11 13:45:16.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Jul 11 13:42:43 CEST 2014 - [email protected] + +- Support RepoInfo content keywords (FATE#316287) +- fix parsing repomd.xml twice +- version 14.25.0 (23) + +------------------------------------------------------------------- Wed Jun 11 07:36:48 CEST 2014 - [email protected] - Patch: add isCategory/isSeverity convenience diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/CMakeLists.txt new/libzypp-14.25.0/zypp/CMakeLists.txt --- old/libzypp-14.24.0/zypp/CMakeLists.txt 2014-04-28 15:36:46.000000000 +0200 +++ new/libzypp-14.25.0/zypp/CMakeLists.txt 2014-07-11 13:45:16.000000000 +0200 @@ -756,7 +756,6 @@ repo/Downloader.h repo/RepoVariables.h repo/RepoInfoBase.h - repo/RepoInfoBaseImpl.h repo/PluginServices.h repo/ServiceRepos.h ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/RepoInfo.cc new/libzypp-14.25.0/zypp/RepoInfo.cc --- old/libzypp-14.24.0/zypp/RepoInfo.cc 2014-01-24 11:28:53.000000000 +0100 +++ new/libzypp-14.25.0/zypp/RepoInfo.cc 2014-07-11 13:45:16.000000000 +0200 @@ -17,12 +17,17 @@ #include "zypp/parser/xml/XmlEscape.h" #include "zypp/RepoInfo.h" -#include "zypp/repo/RepoInfoBaseImpl.h" +#include "zypp/TriBool.h" +#include "zypp/Pathname.h" #include "zypp/repo/RepoMirrorList.h" #include "zypp/ExternalProgram.h" #include "zypp/media/MediaAccess.h" -using namespace std; +#include "zypp/base/IOStream.h" +#include "zypp/base/InputStream.h" +#include "zypp/parser/xml/Reader.h" + +using std::endl; using zypp::xml::escape; /////////////////////////////////////////////////////////////////// @@ -34,11 +39,10 @@ // CLASS NAME : RepoInfo::Impl // /** RepoInfo implementation. */ - struct RepoInfo::Impl : public repo::RepoInfoBase::Impl + struct RepoInfo::Impl { Impl() - : repo::RepoInfoBase::Impl() - , gpgcheck(indeterminate) + : gpgcheck(indeterminate) , keeppackages(indeterminate) , type(repo::RepoType::NONE_e) , emptybaseurls(false) @@ -97,6 +101,56 @@ bool baseurl2dump() const { return !emptybaseurls && !_baseUrls.empty(); } + + void addContent( const std::string & keyword_r ) + { _keywords.insert( keyword_r ); } + + bool hasContent( const std::string & keyword_r ) const + { + if ( _keywords.empty() && ! metadatapath.empty() ) + { + // HACK directly check master index file until RepoManager offers + // some content probing ans zypepr uses it. + ///////////////////////////////////////////////////////////////// + MIL << "Empty keywords...." << metadatapath << endl; + Pathname master; + if ( PathInfo( (master=metadatapath/"/repodata/repomd.xml") ).isFile() ) + { + //MIL << "GO repomd.." << endl; + xml::Reader reader( master ); + while ( reader.seekToNode( 2, "content" ) ) + { + _keywords.insert( reader.nodeText().asString() ); + reader.seekToEndNode( 2, "content" ); + } + _keywords.insert( "" ); // valid content in _keywords even if empty + } + else if ( PathInfo( (master=metadatapath/"/content") ).isFile() ) + { + //MIL << "GO content.." << endl; + iostr::forEachLine( InputStream( master ), + [this]( int num_r, std::string line_r )->bool + { + if ( str::startsWith( line_r, "REPOKEYWORDS" ) ) + { + std::vector<std::string> words; + if ( str::split( line_r, std::back_inserter(words) ) > 1 + && words[0].length() == 12 /*"REPOKEYWORDS"*/ ) + { + this->_keywords.insert( ++words.begin(), words.end() ); + } + return true; // mult. occurrances are ok. + } + return( ! str::startsWith( line_r, "META " ) ); // no need to parse into META section. + } ); + _keywords.insert( "" ); + } + ///////////////////////////////////////////////////////////////// + } + return( _keywords.find( keyword_r ) != _keywords.end() ); + + } + public: TriBool gpgcheck; TriBool keeppackages; @@ -114,6 +168,7 @@ private: Url mirrorlist_url; mutable std::set<Url> _baseUrls; + mutable std::set<std::string> _keywords; friend Impl * rwcowClone<Impl>( const Impl * rhs ); /** clone for RWCOW_pointer */ @@ -272,6 +327,13 @@ bool RepoInfo::baseUrlSet() const { return _pimpl->baseurl2dump(); } + + void RepoInfo::addContent( const std::string & keyword_r ) + { _pimpl->addContent( keyword_r ); } + + bool RepoInfo::hasContent( const std::string & keyword_r ) const + { return _pimpl->hasContent( keyword_r ); } + /////////////////////////////////////////////////////////////////// bool RepoInfo::hasLicense() const @@ -465,7 +527,7 @@ std::ostream & RepoInfo::dumpAsXmlOn( std::ostream & str, const std::string & content ) const { - string tmpstr; + std::string tmpstr; str << "<repo" << " alias=\"" << escape(alias()) << "\"" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/RepoInfo.h new/libzypp-14.25.0/zypp/RepoInfo.h --- old/libzypp-14.24.0/zypp/RepoInfo.h 2014-01-24 11:28:53.000000000 +0100 +++ new/libzypp-14.25.0/zypp/RepoInfo.h 2014-07-11 13:45:16.000000000 +0200 @@ -302,6 +302,40 @@ */ void setTargetDistribution(const std::string & targetDistribution); + /** Add content keywords */ + void addContent( const std::string & keyword_r ); + /** \overload add keywords from container */ + template <class _Iterator> + void addContentFrom( _Iterator begin_r, _Iterator end_r ) + { for_( it, begin_r, end_r ) addContent( *it ); } + /** \overload */ + template <class _Container> + void addContentFrom( const _Container & container_r ) + { addContentFrom( container_r.begin(), container_r.end() ); } + + /** Check for content keywords. + * Checking for an empty string returns whether content kewords are + * known at all. They may be missing due to missing metadata in disabled + * repos. + */ + bool hasContent( const std::string & keyword_r = std::string() ) const; + /** \overload check for \b all keywords being present */ + template <class _Iterator> + bool hasContentAll( _Iterator begin_r, _Iterator end_r ) const + { for_( it, begin_r, end_r ) if ( ! hasContent( *it ) ) return false; return true; } + /** \overload */ + template <class _Container> + bool hasContentAll( const _Container & container_r ) const + { return hasContentAll( container_r.begin(), container_r.end() ); } + /** \overload check for \b any keyword being present */ + template <class _Iterator> + bool hasContentAny( _Iterator begin_r, _Iterator end_r ) const + { for_( it, begin_r, end_r ) if ( hasContent( *it ) ) return true; return false; } + /** \overload */ + template <class _Container> + bool hasContentAny( const _Container & container_r ) const + { return hasContentAny( container_r.begin(), container_r.end() ); } + public: /** \name Repository license */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/ServiceInfo.cc new/libzypp-14.25.0/zypp/ServiceInfo.cc --- old/libzypp-14.24.0/zypp/ServiceInfo.cc 2014-05-27 16:33:19.000000000 +0200 +++ new/libzypp-14.25.0/zypp/ServiceInfo.cc 2014-07-11 13:45:16.000000000 +0200 @@ -16,8 +16,6 @@ #include "zypp/parser/xml/XmlEscape.h" #include "zypp/RepoInfo.h" -#include "zypp/repo/RepoInfoBaseImpl.h" - #include "zypp/ServiceInfo.h" using namespace std; @@ -31,7 +29,7 @@ // // CLASS NAME : ServiceInfo::Impl // - struct ServiceInfo::Impl : public repo::RepoInfoBase::Impl + struct ServiceInfo::Impl { typedef ServiceInfo::ReposToEnable ReposToEnable; typedef ServiceInfo::ReposToDisable ReposToDisable; @@ -46,13 +44,11 @@ public: Impl() - : repo::RepoInfoBase::Impl() - , type(repo::ServiceType::NONE_e) + : type(repo::ServiceType::NONE_e) {} Impl(const Url & url_) - : repo::RepoInfoBase::Impl() - , url(url_) + : url(url_) , type(repo::ServiceType::NONE_e) {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/repo/RepoInfoBase.cc new/libzypp-14.25.0/zypp/repo/RepoInfoBase.cc --- old/libzypp-14.24.0/zypp/repo/RepoInfoBase.cc 2014-01-24 11:28:53.000000000 +0100 +++ new/libzypp-14.25.0/zypp/repo/RepoInfoBase.cc 2014-07-11 13:45:16.000000000 +0200 @@ -15,44 +15,58 @@ #include "zypp/repo/RepoVariables.h" #include "zypp/repo/RepoInfoBase.h" -#include "zypp/repo/RepoInfoBaseImpl.h" +#include "zypp/TriBool.h" +#include "zypp/Pathname.h" using namespace std; /////////////////////////////////////////////////////////////////// namespace zypp -{ ///////////////////////////////////////////////////////////////// +{ /////////////////////////////////////////////////////////////////// namespace repo - { ///////////////////////////////////////////////////////////////// + { /////////////////////////////////////////////////////////////////// - // - // CLASS NAME : RepoInfoBase::Impl - // + /// \class RepoInfoBase::Impl + /// \brief RepoInfoBase data /////////////////////////////////////////////////////////////////// - - /** \relates RepoInfo::Impl Stream output */ - inline std::ostream & operator<<( std::ostream & str, const RepoInfoBase::Impl & obj ) + struct RepoInfoBase::Impl { - return str << "RepoInfo::Impl"; - } + Impl() + : _enabled( indeterminate ) + , _autorefresh( indeterminate ) + {} + + Impl( const std::string & alias_r ) + : _enabled( indeterminate ) + , _autorefresh( indeterminate ) + { setAlias( alias_r ); } + + public: + TriBool _enabled; + TriBool _autorefresh; + std::string _alias; + std::string _escaped_alias; + std::string _name; + Pathname _filepath; - void RepoInfoBase::Impl::setAlias(const string & alias_) - { - this->alias = alias_; - // replace slashes with underscores - std::string fnd="/"; - std::string rep="_"; - std::string escaped_alias = alias_; - size_t pos = escaped_alias.find(fnd); - while (pos != string::npos) + public: + + void setAlias( const std::string & alias_r ) { - escaped_alias.replace(pos, fnd.length(), rep); - pos = escaped_alias.find(fnd, pos+rep.length()); + _alias = _escaped_alias = alias_r; + // replace slashes with underscores + str::replaceAll( _escaped_alias, "/", "_" ); } - this->escaped_alias = escaped_alias; - } + + private: + friend Impl * rwcowClone<Impl>( const Impl * rhs ); + /** clone for RWCOW_pointer */ + Impl * clone() const + { return new Impl( *this ); } + }; + /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // @@ -60,80 +74,51 @@ // /////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////// - // - // METHOD NAME : RepoInfoBase::RepoInfoBase - // METHOD TYPE : Ctor - // RepoInfoBase::RepoInfoBase() : _pimpl( new Impl() ) {} - /////////////////////////////////////////////////////////////////// - // - // METHOD NAME : RepoInfoBase::RepoInfoBase - // METHOD TYPE : Ctor - // RepoInfoBase::RepoInfoBase(const string & alias) : _pimpl( new Impl(alias) ) {} - /////////////////////////////////////////////////////////////////// - // - // METHOD NAME : RepoInfoBase::~RepoInfoBase - // METHOD TYPE : Dtor - // RepoInfoBase::~RepoInfoBase() {} void RepoInfoBase::setEnabled( bool enabled ) - { - _pimpl->enabled = enabled; - } + { _pimpl->_enabled = enabled; } void RepoInfoBase::setAutorefresh( bool autorefresh ) - { - _pimpl->autorefresh = autorefresh; - } + { _pimpl->_autorefresh = autorefresh; } void RepoInfoBase::setAlias( const std::string &alias ) - { - _pimpl->setAlias(alias); - } + { _pimpl->setAlias(alias); } void RepoInfoBase::setName( const std::string &name ) - { - _pimpl->name = name; - } + { _pimpl->_name = name; } void RepoInfoBase::setFilepath( const Pathname &filepath ) - { - _pimpl->filepath = filepath; - } + { _pimpl->_filepath = filepath; } // true by default (if not set by setEnabled()) bool RepoInfoBase::enabled() const - { return indeterminate(_pimpl->enabled) ? true : (bool) _pimpl->enabled; } + { return indeterminate(_pimpl->_enabled) ? true : (bool) _pimpl->_enabled; } // false by default (if not set by setAutorefresh()) bool RepoInfoBase::autorefresh() const - { return indeterminate(_pimpl->autorefresh) ? false : (bool) _pimpl->autorefresh; } + { return indeterminate(_pimpl->_autorefresh) ? false : (bool) _pimpl->_autorefresh; } std::string RepoInfoBase::alias() const - { return _pimpl->alias; } + { return _pimpl->_alias; } std::string RepoInfoBase::escaped_alias() const - { return _pimpl->escaped_alias; } + { return _pimpl->_escaped_alias; } std::string RepoInfoBase::name() const { - if ( _pimpl->name.empty() ) - { + if ( _pimpl->_name.empty() ) return alias(); - } - - repo::RepoVariablesStringReplacer replacer; - return replacer(_pimpl->name); + return repo::RepoVariablesStringReplacer()( _pimpl->_name ); } std::string RepoInfoBase::label() const @@ -144,7 +129,7 @@ } Pathname RepoInfoBase::filepath() const - { return _pimpl->filepath; } + { return _pimpl->_filepath; } std::ostream & RepoInfoBase::dumpOn( std::ostream & str ) const @@ -178,11 +163,8 @@ { return obj.dumpOn(str); } - /////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////// } // namespace repo /////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////// } // namespace zypp /////////////////////////////////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/repo/RepoInfoBaseImpl.h new/libzypp-14.25.0/zypp/repo/RepoInfoBaseImpl.h --- old/libzypp-14.24.0/zypp/repo/RepoInfoBaseImpl.h 2013-03-20 09:29:30.000000000 +0100 +++ new/libzypp-14.25.0/zypp/repo/RepoInfoBaseImpl.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,72 +0,0 @@ -/*---------------------------------------------------------------------\ -| ____ _ __ __ ___ | -| |__ / \ / / . \ . \ | -| / / \ V /| _/ _/ | -| / /__ | | | | | | | -| /_____||_| |_| |_| | -| | -\---------------------------------------------------------------------*/ -/** \file zypp/repo/RepoInfoBaseImpl.h - * - */ -#ifndef REPOINFOBASEIMPL_H_ -#define REPOINFOBASEIMPL_H_ - -#include <string> - -#include "zypp/TriBool.h" -#include "zypp/Pathname.h" - -/////////////////////////////////////////////////////////////////// -namespace zypp -{ ///////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////// - namespace repo - { ///////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // - // CLASS NAME : RepoInfoBase::Impl - // - struct RepoInfoBase::Impl - { - Impl() - : enabled (indeterminate) - , autorefresh (indeterminate) - {} - - Impl(const std::string & alias_) - : enabled(indeterminate) - , autorefresh(indeterminate) - { setAlias(alias_); } - - ~Impl() - {} - - public: - TriBool enabled; - TriBool autorefresh; - std::string alias; - std::string escaped_alias; - std::string name; - Pathname filepath; - public: - - void setAlias(const std::string & alias_); - - private: - friend Impl * rwcowClone<Impl>( const Impl * rhs ); - /** clone for RWCOW_pointer */ - Impl * clone() const - { return new Impl( *this ); } - }; - /////////////////////////////////////////////////////////////////// - - ///////////////////////////////////////////////////////////////// - } // namespace repo - /////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////// -} // namespace zypp -/////////////////////////////////////////////////////////////////// - -#endif /*REPOINFOBASEIMPL_H_*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/repo/yum/Downloader.cc new/libzypp-14.25.0/zypp/repo/yum/Downloader.cc --- old/libzypp-14.24.0/zypp/repo/yum/Downloader.cc 2013-03-20 09:29:30.000000000 +0100 +++ new/libzypp-14.25.0/zypp/repo/yum/Downloader.cc 2014-07-11 13:45:16.000000000 +0200 @@ -184,7 +184,6 @@ this->reset(); - Reader reader( dest_dir + repoInfo().path() + "/repodata/repomd.xml" ); RepomdFileReader( dest_dir + repoInfo().path() + "/repodata/repomd.xml", bind( &Downloader::repomd_Callback, this, _1, _2)); // ready, go! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.24.0/zypp/solver/detail/SATResolver.cc new/libzypp-14.25.0/zypp/solver/detail/SATResolver.cc --- old/libzypp-14.24.0/zypp/solver/detail/SATResolver.cc 2014-04-28 15:36:46.000000000 +0200 +++ new/libzypp-14.25.0/zypp/solver/detail/SATResolver.cc 2014-07-11 13:45:16.000000000 +0200 @@ -989,6 +989,9 @@ sat::Solvable s, s2; ignoreId = 0; + + // FIXME: solver_findallproblemrules to get all rules for this problem + // (the 'most relevabt' one returned by solver_findproblemrule is embedded probr = solver_findproblemrule(_solv, problem); switch (solver_ruleinfo(_solv, probr, &source, &target, &dep)) { -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
