Hello community,
here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2012-12-21 10:22:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
and /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp", Maintainer is "ma@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2012-12-05 13:59:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2012-12-21 10:22:30.000000000 +0100
@@ -1,0 +2,14 @@
+Mon Dec 17 13:31:15 CET 2012 - ma@suse.de
+
+- Add NamedValue<_Tp>: Simple value<>name mapping supporting aliases
+- Enable zypper to remove zypp locks without evaluating the
+ query (bnc#792901)
+- Configure curl to "not fix the BEAST attack" (bnc#779177)
+- version 12.6.0 (0)
+
+-------------------------------------------------------------------
+Sun Dec 16 01:13:16 CET 2012 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Old:
----
libzypp-12.5.0.tar.bz2
New:
----
libzypp-12.6.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.CKeD7t/_old 2012-12-21 10:22:31.000000000 +0100
+++ /var/tmp/diff_new_pack.CKeD7t/_new 2012-12-21 10:22:31.000000000 +0100
@@ -24,7 +24,7 @@
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Package, Patch, Pattern, and Product Management
-Version: 12.5.0
+Version: 12.6.0
Release: 1
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
++++++ libzypp-12.5.0.tar.bz2 -> libzypp-12.6.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/VERSION.cmake new/libzypp-12.6.0/VERSION.cmake
--- old/libzypp-12.5.0/VERSION.cmake 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/VERSION.cmake 2012-12-18 15:58:29.000000000 +0100
@@ -60,9 +60,9 @@
#
SET(LIBZYPP_MAJOR "12")
SET(LIBZYPP_COMPATMINOR "0")
-SET(LIBZYPP_MINOR "5")
+SET(LIBZYPP_MINOR "6")
SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 12.5.0 (0)
+# LAST RELEASED: 12.6.0 (0)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/mkChangelog new/libzypp-12.6.0/mkChangelog
--- old/libzypp-12.5.0/mkChangelog 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/mkChangelog 2012-12-18 15:58:29.000000000 +0100
@@ -172,6 +172,7 @@
[cCsS])
Becho "!!! Store new $CHANGESFILE"
mv $TMPFILE $CHANGESFILE
+ chmod 644 $CHANGESFILE
test "$RES" == "s" && {
if [ "$LAST_RELEASE" == "$THIS_RELEASE" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/package/libzypp.changes new/libzypp-12.6.0/package/libzypp.changes
--- old/libzypp-12.5.0/package/libzypp.changes 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/package/libzypp.changes 2012-12-18 15:58:29.000000000 +0100
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Mon Dec 17 13:31:15 CET 2012 - ma@suse.de
+
+- Add NamedValue<_Tp>: Simple value<>name mapping supporting aliases
+- Enable zypper to remove zypp locks without evaluating the
+ query (bnc#792901)
+- Configure curl to "not fix the BEAST attack" (bnc#779177)
+- version 12.6.0 (0)
+
+-------------------------------------------------------------------
+Sun Dec 16 01:13:16 CET 2012 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Mon Dec 3 14:31:59 CET 2012 - ma@suse.de
- HistoryLogReader: new HistoryLogData based API for parsing the new
Files old/libzypp-12.5.0/po/zypp-po.tar.bz2 and new/libzypp-12.6.0/po/zypp-po.tar.bz2 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/zypp/CMakeLists.txt new/libzypp-12.6.0/zypp/CMakeLists.txt
--- old/libzypp-12.5.0/zypp/CMakeLists.txt 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/zypp/CMakeLists.txt 2012-12-18 15:58:29.000000000 +0100
@@ -246,6 +246,7 @@
base/LogTools.h
base/Logger.h
base/Measure.h
+ base/NamedValue.h
base/NonCopyable.h
base/ProfilingFormater.h
base/ProvideNumericId.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/zypp/PoolQuery.cc new/libzypp-12.6.0/zypp/PoolQuery.cc
--- old/libzypp-12.5.0/zypp/PoolQuery.cc 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/zypp/PoolQuery.cc 2012-12-18 15:58:29.000000000 +0100
@@ -401,17 +401,30 @@
bool operator==( const PoolQuery::Impl & rhs ) const
{
- return ( _strings == rhs._strings
- && _attrs == rhs._attrs
- && _uncompiledPredicated == rhs._uncompiledPredicated
- && _flags == rhs._flags
- && _match_word == rhs._match_word
- && _require_all == rhs._require_all
- && _status_flags == rhs._status_flags
- && _edition == rhs._edition
- && _op == rhs._op
- && _repos == rhs._repos
- && _kinds == rhs._kinds );
+ if ( _flags == rhs._flags
+ // bnc#792901: while libzypp uses exact match mode for a single
+ // package name lock, zypper always uses glob. :(
+ // We unify those two forms to enable zypper to remove zypp locks
+ // without need to actually evaluate the query (which would require
+ // repos to be loaded).
+ || ( _flags.isModeString() && rhs._flags.isModeGlob()
+ || _flags.isModeGlob() && rhs._flags.isModeString() )
+ && _strings.empty()
+ && _attrs.size() == 1
+ && _attrs.begin()->first == sat::SolvAttr::name )
+ {
+ return ( _strings == rhs._strings
+ && _attrs == rhs._attrs
+ && _uncompiledPredicated == rhs._uncompiledPredicated
+ && _match_word == rhs._match_word
+ && _require_all == rhs._require_all
+ && _status_flags == rhs._status_flags
+ && _edition == rhs._edition
+ && _op == rhs._op
+ && _repos == rhs._repos
+ && _kinds == rhs._kinds );
+ }
+ return false;
}
bool operator!=( const PoolQuery::Impl & rhs ) const
@@ -1127,8 +1140,6 @@
PoolQueryAttr attribute( attrName );
- MIL << "attribute name: " << attrName << endl;
-
if ( attribute==PoolQueryAttr::repoAttr )
{
addRepo( attrValue );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/zypp/base/NamedValue.h new/libzypp-12.6.0/zypp/base/NamedValue.h
--- old/libzypp-12.5.0/zypp/base/NamedValue.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-12.6.0/zypp/base/NamedValue.h 2012-12-18 15:58:29.000000000 +0100
@@ -0,0 +1,161 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/base/NamedValue.h
+ *
+*/
+#ifndef ZYPP_BASE_NAMEDVALUE_H
+#define ZYPP_BASE_NAMEDVALUE_H
+
+#include <stdexcept>
+#include <string>
+#include <map>
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{
+
+ ///////////////////////////////////////////////////////////////////
+ /// \class NamedValue<_Tp>
+ /// \brief Simple value<>name mapping supporting aliases.
+ /// \code
+ /// enum Commands {
+ /// CMD_1,
+ /// CMD_2
+ /// };
+ /// NamedValue<Commands> clist;
+ /// // Value | Name | Alias...
+ /// clist( CMD_1 ) | "cmd1";
+ /// clist( CMD_2 ) | "cmd2" | "second";
+ ///
+ /// std::string name( clist.getName( CMD_1 ) );
+ /// Commands cmd( clist.getValue( "second" ) );
+ /// \endcode
+ ///////////////////////////////////////////////////////////////////
+ template< class _Tp, const bool _WithAlias = true >
+ class NamedValue
+ {
+ typedef std::map< std::string, _Tp > NameMap;
+ typedef std::map< _Tp, std::string > ValueMap;
+
+ public:
+ /** Wheter not initialized (no (name,value) pair remembered) */
+ bool empty() const
+ { return( _nameMap.empty() && _valueMap.empty() ); }
+
+ public:
+ /** \name Get value for name or alias. */
+ //@{
+ /** Whether there is a \c value mapped for \a name_r.
+ */
+ bool haveValue( const std::string & name_r ) const
+ {
+ typename NameMap::const_iterator it( _nameMap.find( name_r ) );
+ return( it != _nameMap.end() );
+ }
+
+ /** Get value mapped for name or alias.
+ * \return \c true if name or alias was found.
+ */
+ bool getValue( const std::string & name_r, _Tp & value_r ) const
+ {
+ typename NameMap::const_iterator it( _nameMap.find( name_r ) );
+ if ( it == _nameMap.end() )
+ return false;
+ value_r = it->second;
+ return true;
+ }
+ /** \overload \throws std::out_of_range exception if \a name_r was not found. */
+ const _Tp & getValue( const std::string & name_r ) const
+ { return _nameMap.at( name_r ); }
+ //@}
+
+
+ /** \name Get name for value. */
+ //@{
+ /** Whether there is a \c name mapped for \a value_r.
+ */
+ bool haveName( const std::string & value_r ) const
+ {
+ typename ValueMap::const_iterator it( _valueMap.find( value_r ) );
+ return( it != _valueMap.end() );
+ }
+
+ /** Get name of value.
+ * \return \c true if name or alias was found.
+ */
+ bool getName( const _Tp & value_r, std::string & name_r ) const
+ {
+ typename ValueMap::const_iterator it( _valueMap.find( value_r ) );
+ if ( it == _valueMap.end() )
+ return false;
+ value_r = it->second;
+ return true;
+ }
+ /** \overload \throws std::out_of_range exception if \a value_r was not found. */
+ const std::string & getName( const _Tp & value_r ) const
+ { return _valueMap.at( value_r ); }
+ //@}
+
+ public:
+ /** \name Inserter
+ */
+ //@{
+ class _Inserter
+ {
+ public:
+ _Inserter( NamedValue & parent_r, const _Tp & value_r )
+ : _parent( &parent_r )
+ , _value( value_r )
+ {}
+ _Inserter & operator|( const std::string & name_r )
+ { _parent->insert( _value, name_r ); return *this; }
+ private:
+ NamedValue * _parent;
+ _Tp _value;
+ };
+
+ _Inserter operator()( const _Tp & value_r )
+ { return _Inserter( *this, value_r ); }
+ //@}
+
+ /** Remember name (1st call) or alias (subsequent calls).
+ * \return \C true if this is the 1st call for \a value_r.
+ * \throws std::logic_error if \a name_r is already used as name or alias.
+ * \throws std::logic_error if \c _WithAlias is \c false and a name for \a value_r is already defined.
+ */
+ bool insert( const _Tp & value_r, const std::string & name_r )
+ {
+ typename NameMap::const_iterator nit( _nameMap.find( name_r ) );
+ if ( nit != _nameMap.end() ) // duplicate name
+ throw std::logic_error( "NamedValue::insert name" );
+
+ typename ValueMap::const_iterator tit( _valueMap.find( value_r ) );
+ if ( tit != _valueMap.end() ) // duplicate value, i.e. an alias
+ {
+ if ( !_WithAlias )
+ throw std::logic_error( "NamedValue::insert alias" );
+
+ _nameMap[name_r] = value_r;
+ return false;
+ }
+ // here: 1st entry for value_r
+ _nameMap[name_r] = value_r;
+ _valueMap[value_r] = name_r;
+ return true;
+ }
+
+ private:
+ NameMap _nameMap;
+ ValueMap _valueMap;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_BASE_NAMEDVALUE_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/zypp/media/MediaCurl.cc new/libzypp-12.6.0/zypp/media/MediaCurl.cc
--- old/libzypp-12.5.0/zypp/media/MediaCurl.cc 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/zypp/media/MediaCurl.cc 2012-12-18 15:58:29.000000000 +0100
@@ -607,6 +607,14 @@
SET_OPTION(CURLOPT_CAPATH, _settings.certificateAuthoritiesPath().c_str());
}
+#ifdef CURLSSLOPT_ALLOW_BEAST
+ // see bnc#779177
+ ret = curl_easy_setopt( _curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_ALLOW_BEAST );
+ if ( ret != 0 ) {
+ disconnectFrom();
+ ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
+ }
+#endif
SET_OPTION(CURLOPT_SSL_VERIFYPEER, _settings.verifyPeerEnabled() ? 1L : 0L);
SET_OPTION(CURLOPT_SSL_VERIFYHOST, _settings.verifyHostEnabled() ? 2L : 0L);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/zypp/repo/PackageProvider.cc new/libzypp-12.6.0/zypp/repo/PackageProvider.cc
--- old/libzypp-12.5.0/zypp/repo/PackageProvider.cc 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/zypp/repo/PackageProvider.cc 2012-12-18 15:58:29.000000000 +0100
@@ -335,30 +335,23 @@
url = * info.baseUrlsBegin();
// check whether to process patch/delta rpms
- if ( url.schemeIsDownloading() || ZConfig::instance().download_use_deltarpm_always() )
- {
- std::list<DeltaRpm> deltaRpms;
- if ( ZConfig::instance().download_use_deltarpm() )
- {
- _deltas.deltaRpms( _package ).swap( deltaRpms );
- }
+ if ( ZConfig::instance().download_use_deltarpm()
+ && ( url.schemeIsDownloading() || ZConfig::instance().download_use_deltarpm_always() ) )
+ {
+ std::list<DeltaRpm> deltaRpms;
+ _deltas.deltaRpms( _package ).swap( deltaRpms );
- if ( ! ( deltaRpms.empty() )
- && queryInstalled() )
- {
- if ( ! deltaRpms.empty() && applydeltarpm::haveApplydeltarpm() )
- {
- for( std::list<DeltaRpm>::const_iterator it = deltaRpms.begin();
- it != deltaRpms.end(); ++it )
- {
- DBG << "tryDelta " << *it << endl;
- ManagedFile ret( tryDelta( *it ) );
- if ( ! ret->empty() )
- return ret;
- }
- }
- }
- }
+ if ( ! deltaRpms.empty() && queryInstalled() && applydeltarpm::haveApplydeltarpm() )
+ {
+ for_( it, deltaRpms.begin(), deltaRpms.end())
+ {
+ DBG << "tryDelta " << *it << endl;
+ ManagedFile ret( tryDelta( *it ) );
+ if ( ! ret->empty() )
+ return ret;
+ }
+ }
+ }
// no patch/delta -> provide full package
return Base::doProvidePackage();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-12.5.0/zypp/repo/RepoType.cc new/libzypp-12.6.0/zypp/repo/RepoType.cc
--- old/libzypp-12.5.0/zypp/repo/RepoType.cc 2012-12-03 14:41:52.000000000 +0100
+++ new/libzypp-12.6.0/zypp/repo/RepoType.cc 2012-12-18 15:58:29.000000000 +0100
@@ -8,7 +8,7 @@
\---------------------------------------------------------------------*/
#include <iostream>
-#include <map>
+#include "zypp/base/NamedValue.h"
#include "zypp/repo/RepoException.h"
#include "RepoType.h"
@@ -16,72 +16,46 @@
{
namespace repo
{
+ ///////////////////////////////////////////////////////////////////
+ namespace
+ {
+ static NamedValueRepoType::Type & table()
+ {
+ static NamedValueRepoType::Type _t;
+ if ( _t.empty() )
+ {
+ _t( RepoType::RPMMD_e ) | "rpm-md" | "rpmmd"|"repomd"|"yum"|"up2date";
+ _t( RepoType::YAST2_e ) | "yast2" | "yast"|"susetags";
+ _t( RepoType::RPMPLAINDIR_e ) | "plaindir";
+ _t( RepoType::NONE_e ) | "NONE" | "none";
+ }
+ return _t;
+ }
+ } // namespace
+ ///////////////////////////////////////////////////////////////////
- static std::mapstd::string,RepoType::Type _table;
-
- const RepoType RepoType::RPMMD(RepoType::RPMMD_e);
- const RepoType RepoType::YAST2(RepoType::YAST2_e);
- const RepoType RepoType::RPMPLAINDIR(RepoType::RPMPLAINDIR_e);
- const RepoType RepoType::NONE(RepoType::NONE_e);
+ const RepoType RepoType::RPMMD ( RepoType::RPMMD_e );
+ const RepoType RepoType::YAST2 ( RepoType::YAST2_e );
+ const RepoType RepoType::RPMPLAINDIR ( RepoType::RPMPLAINDIR_e );
+ const RepoType RepoType::NONE ( RepoType::NONE_e );
RepoType::RepoType(const std::string & strval_r)
: _type(parse(strval_r))
{}
- RepoType::Type RepoType::parse(const std::string & strval_r)
+ RepoType::Type RepoType::parse( const std::string & strval_r )
{
- if (_table.empty())
- {
- // initialize it
- _table["repomd"]
- = _table["rpmmd"]
- = _table["rpm-md"]
- = _table["yum"]
- = _table["YUM"]
- = _table["up2date"]
- = RepoType::RPMMD_e;
-
- _table["susetags"]
- = _table["yast"]
- = _table["YaST"]
- = _table["YaST2"]
- = _table["YAST"]
- = _table["YAST2"]
- = _table["yast2"]
- = RepoType::YAST2_e;
-
- _table["plaindir"]
- = _table["Plaindir"]
- = RepoType::RPMPLAINDIR_e;
-
- _table["NONE"]
- = _table["none"]
- = RepoType::NONE_e;
- }
-
- std::mapstd::string,RepoType::Type::const_iterator it
- = _table.find(strval_r);
- if (it == _table.end())
+ RepoType::Type type;
+ if ( ! table().getValue( str::toLower( strval_r ), type ) )
{
- ZYPP_THROW(RepoUnknownTypeException(
- "Unknown repository type '" + strval_r + "'"));
+ ZYPP_THROW( RepoUnknownTypeException( "Unknown repository type '" + strval_r + "'") );
}
- return it->second;
+ return type;
}
-
const std::string & RepoType::asString() const
{
- static std::map