# See './mkChangelog -h' for help.
#
SET(LIBZYPP_MAJOR "15")
-SET(LIBZYPP_COMPATMINOR "3")
-SET(LIBZYPP_MINOR "4")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_COMPATMINOR "5")
+SET(LIBZYPP_MINOR "5")
+SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 15.4.1 (3)
+# LAST RELEASED: 15.5.0 (5)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
.\" Title: locks
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 10/02/2014
+.\" Date: 06/12/2015
.\" Manual: LIBZYPP
-.\" Source: libzypp
+.\" Source: SUSE Linux
.\" Language: English
.\"
-.TH "LOCKS" "5" "10/02/2014" "libzypp" "LIBZYPP"
+.TH "LOCKS" "5" "06/12/2015" "SUSE Linux" "LIBZYPP"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
-locks(5)
+LOCKS(5)
========
:man manual: LIBZYPP
-:man source: libzypp
+:man source: SUSE Linux
NAME
'\" t
-.\" Title: zypp-CheckAccessDeleted
+.\" Title: zypp-checkaccessdeleted
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 10/02/2014
+.\" Date: 06/12/2015
.\" Manual: LIBZYPP
-.\" Source: libzypp
+.\" Source: SUSE Linux
.\" Language: English
.\"
-.TH "ZYPP\-CHECKACCESSDEL" "1" "10/02/2014" "libzypp" "LIBZYPP"
+.TH "ZYPP\-CHECKACCESSDEL" "1" "06/12/2015" "SUSE Linux" "LIBZYPP"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
-zypp-CheckAccessDeleted(1)
+ZYPP-CHECKACCESSDELETED(1)
==========================
:man manual: LIBZYPP
-:man source: libzypp
+:man source: SUSE Linux
NAME
'\" t
-.\" Title: zypp-NameReqPrv
+.\" Title: zypp-namereqprv
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 10/02/2014
+.\" Date: 06/12/2015
.\" Manual: LIBZYPP
-.\" Source: libzypp
+.\" Source: SUSE Linux
.\" Language: English
.\"
-.TH "ZYPP\-NAMEREQPRV" "1" "10/02/2014" "libzypp" "LIBZYPP"
+.TH "ZYPP\-NAMEREQPRV" "1" "06/12/2015" "SUSE Linux" "LIBZYPP"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
-zypp-NameReqPrv(1)
+ZYPP-NAMEREQPRV(1)
==================
:man manual: LIBZYPP
-:man source: libzypp
+:man source: SUSE Linux
NAME
-------------------------------------------------------------------
+Sat Jun 27 17:07:32 CEST 2015 - ma@suse.de
+
+- Patch: fixup testing Category and Severity flags (FATE#318760)
+- version 15.5.0 (5)
+
+-------------------------------------------------------------------
Fri Jun 12 12:14:04 CEST 2015 - ma@suse.de
- Add details to the default signature verification problem report
t = T_3;
+ BOOST_CHECK( ! t.testFlag( T_0 ) ); // fails as T_3 != 0
BOOST_CHECK( t.testFlag( T_1 ) );
BOOST_CHECK( t.testFlag( T_2 ) );
BOOST_CHECK( t.testFlag( T_3 ) );
t.unsetFlag( T_2 ); BOOST_CHECK( t.testFlag( T_1 ) );
- t.setFlag( T_1, false ); BOOST_CHECK( t.testFlag( T_0 ) );
+ t.setFlag( T_1, false ); BOOST_CHECK( t.testFlag( T_0 ) ); // succeed as T_3 == 0
t.setFlag( T_3, true ); BOOST_CHECK( t.testFlag( T_3 ) );
}
CheckSum real_checksum( _checksum.type(), filesystem::checksum( file, _checksum.type() ));
if ( (real_checksum != _checksum) )
{
+ WAR << "File " << file << " has wrong checksum " << real_checksum << " (expected " << _checksum << ")" << endl;
if ( report->askUserToAcceptWrongDigest( file, _checksum.checksum(), real_checksum.checksum() ) )
{
WAR << "User accepted " << file << " with WRONG CHECKSUM." << std::endl;
bool Package::maybeUnsupported() const
{
- static const VendorSupportOptions unsupportedOpts( VendorSupportUnknown
- | VendorSupportUnsupported
- | VendorSupportACC );
- return unsupportedOpts.testFlag( vendorSupport() );
+ switch ( vendorSupport() )
+ {
+ case VendorSupportUnknown:
+ case VendorSupportUnsupported:
+ case VendorSupportACC:
+ return true;
+ }
+ return false;
}
Changelog Package::changelog() const
bool Patch::isCategory( const std::string & category_r ) const
{ return( str::compareCI( category_r, category() ) == 0 ); }
+ bool Patch::isCategory( Categories category_r ) const
+ { return category_r.testFlag( categoryEnum() ); }
+
Patch::Category Patch::categoryEnum( const std::string & category_r )
{
switch ( category_r[0] )
break;
}
// default:
+ INT << "Unrecognized Patch::Category string '" << category_r << "'" << endl;
return CAT_OTHER;
}
bool Patch::isSeverity( const std::string & severity_r ) const
{ return( str::compareCI( severity_r, severity() ) == 0 ); }
+ bool Patch::isSeverity( SeverityFlags severity_r ) const
+ { return severity_r.testFlag( severityFlag() ); }
+
Patch::SeverityFlag Patch::severityFlag( const std::string & severity_r )
{
switch ( severity_r[0] )
break;
}
// default:
+ INT << "Unrecognized Patch::Severity string '" << severity_r << "'" << endl;
return SEV_OTHER;
}
{
switch ( obj )
{
- case Patch::SEV_NONE: return std::string( "unspecified" ); break;
case Patch::SEV_OTHER: return std::string( "unknown" ); break;
+ case Patch::SEV_NONE: return std::string( "unspecified" ); break;
case Patch::SEV_LOW: return std::string( "low" ); break;
case Patch::SEV_MODERATE: return std::string( "moderate" ); break;
case Patch::SEV_IMPORTANT:return std::string( "important" ); break;
typedef sat::SolvableSet Contents;
enum Category {
- CAT_OTHER,
- CAT_YAST,
- CAT_SECURITY,
- CAT_RECOMMENDED,
- CAT_OPTIONAL,
- CAT_DOCUMENT
+ CAT_OTHER = 1, //!< unknown value specified
+ CAT_YAST = 1<<1, //!<
+ CAT_SECURITY = 1<<2, //!<
+ CAT_RECOMMENDED = 1<<3, //!<
+ CAT_OPTIONAL = 1<<4, //!<
+ CAT_DOCUMENT = 1<<5 //!<
};
+ ZYPP_DECLARE_FLAGS(Categories, Category);
/**
* Flags defining if and why this
* \ref asSring( const Patch::SeverityFlag & ).
*/
enum SeverityFlag {
- SEV_NONE = 0, //!< no value specified
SEV_OTHER = 1, //!< unknown value specified
- SEV_LOW = 1<<1, //!< Low
- SEV_MODERATE = 1<<2, //!< Moderate
- SEV_IMPORTANT = 1<<3, //!< Important
- SEV_CRITICAL = 1<<4 //!< Critical
+ SEV_NONE = 1<<1, //!< no value specified
+ SEV_LOW = 1<<2, //!< Low
+ SEV_MODERATE = 1<<3, //!< Moderate
+ SEV_IMPORTANT = 1<<4, //!< Important
+ SEV_CRITICAL = 1<<5 //!< Critical
};
ZYPP_DECLARE_FLAGS(SeverityFlags, SeverityFlag);
/** Whether this patch's category matches \a category_r */
bool isCategory( const std::string & category_r ) const;
+ /** \overload taking OR'ed \ref Categories */
+ bool isCategory( Categories category_r ) const;
+ /** \overload taking container of category strings */
+ template <class _Container>
+ bool isCategory( const _Container & categories_r ) const
+ {
+ for ( const std::string & el : categories_r )
+ { if ( isCategory( el ) ) return true; }
+ return false;
+ }
/** Patch category as enum of wellknown categories.
* Unknown values are mapped to \ref CAT_OTHER.
/** Whether this patch's severity matches \a severity_r */
bool isSeverity( const std::string & severity_r ) const;
+ /** \overload taking OR'ed \ref SeverityFlags */
+ bool isSeverity( SeverityFlags severity_r ) const;
+ /** \overload taking container of severity strings */
+ template <class _Container>
+ bool isSeverity( const _Container & severities_r ) const
+ {
+ for ( const std::string & el : severities_r )
+ { if ( isSeverity( el ) ) return true; }
+ return false;
+ }
/** Severity string mapped to an enum.
* Unknown string values are mapped to \ref SEV_OTHER
/** Dtor */
virtual ~Patch();
};
+ ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Patch::Categories);
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Patch::InteractiveFlags);
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Patch::SeverityFlags);
Flags & unsetFlag( Flags flag_r ) { _val &= ~flag_r; return *this; }
Flags & unsetFlag( Enum flag_r ) { _val &= ~flag_r; return *this; }
- bool testFlag( Flags flag_r ) const { return ( _val & flag_r ) == flag_r; }
- bool testFlag( Enum flag_r ) const { return ( _val & flag_r ) == flag_r; }
+ bool testFlag( Flags flag_r ) const { return flag_r ? ( _val & flag_r ) == flag_r : !_val; }
+ bool testFlag( Enum flag_r ) const { return flag_r ? ( _val & flag_r ) == flag_r : !_val; }
private:
Integral _val;
#include <string>
#include <sstream>
#include <boost/format.hpp>
+#include <boost/utility/string_ref.hpp>
#include "zypp/base/Easy.h"
#include "zypp/base/PtrTypes.h"
* bool hasPrefix( const C_Str & str_r, const C_Str & prefix_r )
* { return( ::strncmp( str_r, prefix_r, prefix_r.size() ) == 0 ); }
* \endcode
+ *
+ * \todo Check whether to replace by boost::string_ref
*/
class C_Str
{
C_Str( char * c_str_r ) : _val( c_str_r ), _sze( std::string::npos ) {}
C_Str( const char * c_str_r ) : _val( c_str_r ), _sze( std::string::npos ) {}
C_Str( const std::string & str_r ) : _val( str_r.c_str() ), _sze( str_r.size() ) {}
+ C_Str( const boost::string_ref & str_r ) : _val( str_r.data() ), _sze( str_r.size() ) {}
public:
bool isNull() const { return !_val; }
/**
* Global asString() that works with std::string too
*/
- inline std::string asString( const std::string &t )
+ inline const std::string & asString( const std::string & t )
{ return t; }
#ifndef SWIG // Swig treats it as syntax error
- inline std::string asString( std::string && t )
+ inline std::string && asString( std::string && t )
{ return std::move(t); }
#endif