#
SET(LIBZYPP_MAJOR "14")
SET(LIBZYPP_COMPATMINOR "30")
-SET(LIBZYPP_MINOR "30")
-SET(LIBZYPP_PATCH "2")
+SET(LIBZYPP_MINOR "31")
+SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 14.30.2 (30)
+# LAST RELEASED: 14.31.0 (30)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
%description
Package, Patch, Pattern, and Product Management
-Authors:
---------
- Michael Andres <ma@suse.de>
- Jiri Srain <jsrain@suse.cz>
- Stefan Schubert <schubi@suse.de>
- Duncan Mac-Vicar <dmacvicar@suse.de>
- Klaus Kaempf <kkaempf@suse.de>
- Marius Tomaschewski <mt@suse.de>
- Stanislav Visnovsky <visnov@suse.cz>
- Ladislav Slezak <lslezak@suse.cz>
-
%package devel
Summary: Package, Patch, Pattern, and Product Management - developers files
Group: Development/Libraries/C and C++
%package devel-doc
Summary: Package, Patch, Pattern, and Product Management - developers files
Group: Documentation/HTML
-Provides: yast2-packagemanager-devel
-Obsoletes: yast2-packagemanager-devel
%description devel-doc
Package, Patch, Pattern, and Product Management - developers files
-------------------------------------------------------------------
+Mon Dec 8 14:53:00 CET 2014 - ma@suse.de
+
+- Adapt to gpg-2.1 (bnc#908135)
+- rpm: do not obsolete yast2-packagemanager-devel by libzypp-devel-doc
+- replaceAll: fix endless loop on empty search string
+- version 14.31.0 (30)
+
+-------------------------------------------------------------------
+Thu Nov 27 07:40:30 UTC 2014 - dimstar@opensuse.org
+
+- Do not provide/obsolete yast2-packagemanager-devel by the -doc
+ package: the -devel package already does that.
+- Minor .spec cleanup (remove Authors section).
+
+-------------------------------------------------------------------
Tue Nov 11 17:09:28 CET 2014 - ma@suse.de
- Call rpm with '--noglob' (bnc#892431)
BOOST_CHECK_EQUAL(c, 2);
}
-BOOST_AUTO_TEST_CASE(asString)
+BOOST_AUTO_TEST_CASE(asStringTest)
{
BOOST_CHECK_EQUAL( sat::Solvable(0).asString(), "noSolvable" );
BOOST_CHECK_EQUAL( sat::Solvable(1).asString(), "systemSolvable" );
#include <boost/test/auto_unit_test.hpp>
+#include <iostream>
#include <set>
#include "zypp/ContentType.h"
BOOST_CHECK_EQUAL( *(i++), ContentType( "b", "b" ) );
BOOST_CHECK_EQUAL( *(i++), ContentType( "b", "c" ) );
BOOST_CHECK( i == c.end() );
-}
\ No newline at end of file
+}
#include <boost/test/auto_unit_test.hpp>
+#include <iostream>
#include "zypp/CpeId.h"
using std::cout;
private:
struct Cache
{
- scoped_ptr<WatchFile> _keyringP;
- std::list<PublicKeyData> _data;
-
// Empty copy ctor to allow insert into std::map as
// scoped_ptr is noncopyable.
Cache() {}
Cache( const Cache & rhs ) {}
+
+ void assertCache( const Pathname & keyring_r )
+ {
+ ExternalProgram("ls -l "+keyring_r.asString()) >> SEC;
+ // .kbx since gpg2-2.1
+ if ( !_keyringK )
+ _keyringK.reset( new WatchFile( keyring_r/"pubring.kbx", WatchFile::NO_INIT ) );
+ if ( !_keyringP )
+ _keyringP.reset( new WatchFile( keyring_r/"pubring.gpg", WatchFile::NO_INIT ) );
+ }
+
+ bool hasChanged() const
+ {
+ bool k = _keyringK->hasChanged(); // be sure both files are checked
+ bool p = _keyringP->hasChanged();
+ return k || p;
+ }
+
+ std::list<PublicKeyData> _data;
+
+ private:
+ scoped_ptr<WatchFile> _keyringK;
+ scoped_ptr<WatchFile> _keyringP;
};
typedef std::map<Pathname,Cache> CacheMap;
const std::list<PublicKeyData> & getData( const Pathname & keyring_r ) const
{
Cache & cache( _cacheMap[keyring_r] );
- if ( ! cache._keyringP )
- {
- // init new cache entry
- cache._keyringP.reset( new WatchFile( keyring_r/"pubring.gpg", WatchFile::NO_INIT ) );
- }
+ // init new cache entry
+ cache.assertCache( keyring_r );
return getData( keyring_r, cache );
}
const std::list<PublicKeyData> & getData( const Pathname & keyring_r, Cache & cache_r ) const
{
- if ( cache_r._keyringP->hasChanged() )
+ if ( cache_r.hasChanged() )
{
const char* argv[] =
{
std::string & replaceAll( std::string & str_r, const std::string & from_r, const std::string & to_r )
{
- std::string::size_type pos = 0;
- while ( (pos = str_r.find( from_r, pos )) != std::string::npos )
+ if ( ! from_r.empty() )
{
- str_r.replace( pos, from_r.size(), to_r );
- pos += to_r.size();
+ std::string::size_type pos = 0;
+ while ( (pos = str_r.find( from_r, pos )) != std::string::npos )
+ {
+ str_r.replace( pos, from_r.size(), to_r );
+ pos += to_r.size();
- if ( pos >= str_r.length() )
- break;
+ if ( pos >= str_r.length() )
+ break;
+ }
}
return str_r;
}
std::string & replaceAllFun( std::string & str_r, const std::string & from_r, function<std::string()> to_r )
{
- std::string::size_type pos = 0;
- while ( (pos = str_r.find( from_r, pos )) != std::string::npos )
+ if ( ! from_r.empty() )
{
- std::string to( to_r() );
- str_r.replace( pos, from_r.size(), to );
- pos += to.size();
+ std::string::size_type pos = 0;
+ while ( (pos = str_r.find( from_r, pos )) != std::string::npos )
+ {
+ std::string to( to_r() );
+ str_r.replace( pos, from_r.size(), to );
+ pos += to.size();
- if ( pos >= str_r.length() )
- break;
+ if ( pos >= str_r.length() )
+ break;
+ }
}
return str_r;
}
/** String related utilities and \ref ZYPP_STR_REGEX.
\see \ref ZYPP_STR_REGEX
*/
+
namespace str
{ /////////////////////////////////////////////////////////////////
inline bool endsWith( const C_Str & str_r, const C_Str & prefix_r )
{ return hasSuffix( str_r, prefix_r ); }
//@}
- /////////////////////////////////////////////////////////////////
} // namespace str
///////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////
+
+ // drag into zypp:: namespace
+ using str::asString;
+
} // namespace zypp
///////////////////////////////////////////////////////////////////
#endif // ZYPP_BASE_STRING_H
using xml::escape;
using xml::unescape;
- /** \relates NodeAttr NODE ATTRIBUTE representation of types [str::asString] */
+ /** \relates NodeAttr NODE ATTRIBUTE representation of types [asString] */
template <class _Tp>
std::string asXmlNodeAttr( const _Tp & val_r )
- { return str::asString( val_r ); }
+ { return asString( val_r ); }
///////////////////////////////////////////////////////////////////
/// \class NodeAttr