#
SET(LIBZYPP_MAJOR "14")
SET(LIBZYPP_COMPATMINOR "30")
-SET(LIBZYPP_MINOR "32")
-SET(LIBZYPP_PATCH "2")
+SET(LIBZYPP_MINOR "33")
+SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 14.32.2 (30)
+# LAST RELEASED: 14.33.0 (30)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
BuildRequires: pkg-config
%endif
-BuildRequires: libsolv-devel >= 0.6.6
+BuildRequires: libsolv-devel >= 0.6.7
%if 0%{?suse_version} >= 1100
BuildRequires: libsolv-tools
%requires_eq libsolv-tools
-------------------------------------------------------------------
+Fri Dec 19 10:05:00 CET 2014 - ma@suse.de
+
+- Parse and offer productRegisterFlavor attribute (bnc#896224)
+- version 14.33.0 (30)
+
+-------------------------------------------------------------------
+Thu Dec 18 01:13:20 CET 2014 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Wed Dec 17 18:44:26 CET 2014 - ma@suse.de
- Improve conflict message for locked packages (bnc#828631)
BOOST_CHECK_EQUAL( data.productline(), "" );
BOOST_CHECK_EQUAL( data.registerTarget(), "sle-11-i586" );
BOOST_CHECK_EQUAL( data.registerRelease(), "whatever" );
+ BOOST_CHECK_EQUAL( data.registerFlavor(), "module" );
BOOST_CHECK_EQUAL( data.updaterepokey(), "A43242DKD" );
BOOST_REQUIRE_EQUAL( data.upgrades().size(), 2 );
<register>
<target>sle-11-i586</target>
<release>whatever</release>
+ <flavor>module</flavor>
</register>
<buildconfig>
<!-- This section is needed to generate the installation media -->
: _date( date_r )
{}
/** Ctor taking time_t value as string. */
- Date( const std::string & seconds_r );
+ explicit Date( const std::string & seconds_r );
/**
* Ctor from a \a date_str (in localtime) formatted using \a format.
std::string Product::registerRelease() const
{ return lookupStrAttribute( sat::SolvAttr::productRegisterRelease ); }
+ std::string Product::registerFlavor() const
+ { return lookupStrAttribute( sat::SolvAttr::productRegisterFlavor ); }
+
/////////////////////////////////////////////////////////////////
Product::UrlList Product::urls( const std::string & key_r ) const
*/
std::string registerRelease() const;
+ /** This is \c register.flavor attribute of a product.
+ * Used for registration.
+ */
+ std::string registerFlavor() const;
+
public:
/***/
class UrlList;
virtual void text( const Node & node_r )
{
- *_value = node_r.value().asString();
+ *_value = Date(node_r.value().asString());
}
Date *_value;
std::string Target::targetDistributionRelease( const Pathname & root_r )
{ return target::TargetImpl::targetDistributionRelease( root_r ); }
+ std::string Target::targetDistributionFlavor() const
+ { return _pimpl->targetDistributionFlavor(); }
+ std::string Target::targetDistributionFlavor( const Pathname & root_r )
+ { return target::TargetImpl::targetDistributionFlavor( root_r ); }
+
Target::DistributionLabel Target::distributionLabel() const
{ return _pimpl->distributionLabel(); }
Target::DistributionLabel Target::distributionLabel( const Pathname & root_r )
/** \overload */
static std::string targetDistributionRelease( const Pathname & root_r );
+ /** This is \c register.release attribute of the installed base product.
+ * Used for registration.
+ * \note don't mistake this for \ref distributionFlavor
+ */
+ std::string targetDistributionFlavor() const;
+ /** \overload */
+ static std::string targetDistributionFlavor( const Pathname & root_r );
+
struct DistributionLabel { std::string shortName; std::string summary; };
/** This is \c shortName and \c summary attribute of the installed base product.
* Used e.g. for the bootloader menu.
* the last used one. It can be empty is the target has never
* been loaded, as the value is not present in the system
* but computer from a package provides
+ * \note don't mistake this for \ref targetDistributionFlavor
*/
std::string distributionFlavor() const;
/** \overload */
/// } // </node>
/// \endcode
///
+ /// \note If the nodename is empty or starts with an \c !, a comment is written.
+ ///
struct Node
{
NON_COPYABLE_BUT_MOVE( Node );
/** Dtor wrting end tag */
~Node()
{
- if ( ! _name.empty() )
+ if ( _name.empty() )
+ _out << "-->";
+ else
{
if ( _hasContent )
_out << "</" << _name << ">";
if ( ! _hasContent )
{
_hasContent = true;
- if ( ! _name.empty() )
+ if ( _name.empty() )
+ _out << "|";
+ else
_out << ">";
}
return _out;
private:
void printStart( const std::initializer_list<Attr> & attrs_r )
{
- if ( ! _name.empty() )
+ if ( _name.empty() || _name[0] == '!' )
{
- _out << "<" << _name;
- for ( const auto & pair : attrs_r )
- _out << " " << pair.first << "=\"" << xml::escape( pair.second ) << "\"";
- if ( _hasContent )
- _out << ">";
+ _out << "<!--" << _name;
+ _name.clear();
}
+ else
+ _out << "<" << _name;
+
+ for ( const auto & pair : attrs_r )
+ _out << " " << pair.first << "=\"" << xml::escape( pair.second ) << "\"";
+
+ if ( ! _name.empty() && _hasContent )
+ _out << ">";
}
private:
std::ostream & _out;
} // namespace xmlout
///////////////////////////////////////////////////////////////////
+
+ /// \name Default dumpAsXmlOn based on asString.
+ ///
+ //@{
+ template <class _Tp>
+ inline std::ostream & dumpAsXmlOn( std::ostream & str, const _Tp & obj, const std::string & name_r )
+ {
+ xmlout::Node guard( str, name_r, xmlout::Node::optionalContent );
+ const std::string & content( asString( obj ) );
+ if ( ! content.empty() ) *guard << content;
+ return str;
+ }
+ //@}
+ //
} // namespace zypp
///////////////////////////////////////////////////////////////////
#endif // ZYPP_BASE_XML_H
std::string _productline;
std::string _registerTarget;
std::string _registerRelease;
+ std::string _registerFlavor;
std::string _updaterepokey;
std::string ProductFileData::productline() const { return _pimpl->_productline; }
std::string ProductFileData::registerTarget() const { return _pimpl->_registerTarget; }
std::string ProductFileData::registerRelease() const { return _pimpl->_registerRelease; }
+ std::string ProductFileData::registerFlavor() const { return _pimpl->_registerFlavor; }
std::string ProductFileData::updaterepokey() const { return _pimpl->_updaterepokey; }
(*this)["register"]
("target", OPTIONAL, xml::parseDefAssign( _pdata._registerTarget ) )
("release", OPTIONAL, xml::parseDefAssign( _pdata._registerRelease ) )
+ ("flavor", OPTIONAL, xml::parseDefAssign( _pdata._registerFlavor ) )
;
(*this)["upgrades"]
std::string productline() const;
std::string registerTarget() const;
std::string registerRelease() const;
+ std::string registerFlavor() const;
public:
std::string updaterepokey() const;
const SolvAttr SolvAttr::productEndOfLife ( PRODUCT_ENDOFLIFE );
const SolvAttr SolvAttr::productRegisterTarget ( PRODUCT_REGISTER_TARGET );
const SolvAttr SolvAttr::productRegisterRelease( PRODUCT_REGISTER_RELEASE );
+ const SolvAttr SolvAttr::productRegisterFlavor ( PRODUCT_REGISTER_FLAVOR );
const SolvAttr SolvAttr::productUrl ( PRODUCT_URL );
const SolvAttr SolvAttr::productUrlType ( PRODUCT_URL_TYPE );
/** array of repoids, hopefully label s too */
static const SolvAttr productEndOfLife;
static const SolvAttr productRegisterTarget;
static const SolvAttr productRegisterRelease;
+ static const SolvAttr productRegisterFlavor;
static const SolvAttr productUrl;
static const SolvAttr productUrlType;
static const SolvAttr productUpdates; // SUB-STRUCTURE:
std::string TargetImpl::targetDistributionRelease( const Pathname & root_r )
{ return baseproductdata( staticGuessRoot(root_r) ).registerRelease();}
+ std::string TargetImpl::targetDistributionFlavor() const
+ { return baseproductdata( _root ).registerFlavor(); }
+ // static version:
+ std::string TargetImpl::targetDistributionFlavor( const Pathname & root_r )
+ { return baseproductdata( staticGuessRoot(root_r) ).registerFlavor();}
+
Target::DistributionLabel TargetImpl::distributionLabel() const
{
Target::DistributionLabel ret;
/** \overload */
static std::string targetDistributionRelease( const Pathname & root_r );
+ /** \copydoc Target::targetDistributionFlavor()*/
+ std::string targetDistributionFlavor() const;
+ /** \overload */
+ static std::string targetDistributionFlavor( const Pathname & root_r );
+
/** \copydoc Target::distributionVersion()*/
Target::DistributionLabel distributionLabel() const;
/** \overload */