ref: refs/heads/master
commit d24e4e78138a617238ff99007efda20671791a04
Author: Michael Andres
Date: Mon Nov 30 17:56:34 2009 +0100
Also parse <product> tag from .prod files <upgrade> section.
---
zypp/parser/ProductFileReader.cc | 6 +++++-
zypp/parser/ProductFileReader.h | 2 ++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/zypp/parser/ProductFileReader.cc b/zypp/parser/ProductFileReader.cc
index d3c8ec3..34cb7ea 100644
--- a/zypp/parser/ProductFileReader.cc
+++ b/zypp/parser/ProductFileReader.cc
@@ -41,6 +41,7 @@ namespace zypp
std::string _name;
std::string _summary;
std::string _repository;
+ std::string _product;
DefaultIntegral _notify;
std::string _status;
};
@@ -52,6 +53,7 @@ namespace zypp
std::string ProductFileData::Upgrade::name() const { return _pimpl->_name; }
std::string ProductFileData::Upgrade::summary() const { return _pimpl->_summary; }
std::string ProductFileData::Upgrade::repository() const { return _pimpl->_repository; }
+ std::string ProductFileData::Upgrade::product() const { return _pimpl->_product; }
bool ProductFileData::Upgrade::notify() const { return _pimpl->_notify; }
std::string ProductFileData::Upgrade::status() const { return _pimpl->_status; }
@@ -111,9 +113,10 @@ namespace zypp
std::ostream & operator<<( std::ostream & str, const ProductFileData::Upgrade & obj )
{
- str << str::form( "|upgrade|%s|%s|%s|%s|",
+ str << str::form( "|upgrade|%s|%s|%s|%s|%s|",
obj.name().c_str(),
obj.repository().c_str(),
+ obj.product().c_str(),
obj.status().c_str(),
(obj.notify() ? "notify" : "noNotify") );
return str;
@@ -156,6 +159,7 @@ namespace zypp
("name", OPTIONAL, xml::parseDefAssign( _upgrade._name ) )
("summary", OPTIONAL, xml::parseDefAssign( _upgrade._summary ) )
("repository", OPTIONAL, xml::parseDefAssign( _upgrade._repository ) )
+ ("product", OPTIONAL, xml::parseDefAssign( _upgrade._product ) )
("notify", OPTIONAL, xml::parseDefAssign( _upgrade._notify ) )
("status", OPTIONAL, xml::parseDefAssign( _upgrade._status ) )
;
diff --git a/zypp/parser/ProductFileReader.h b/zypp/parser/ProductFileReader.h
index d30ed67..1aa26e6 100644
--- a/zypp/parser/ProductFileReader.h
+++ b/zypp/parser/ProductFileReader.h
@@ -64,6 +64,7 @@ namespace zypp
public:
///////////////////////////////////////////////////////////////////
+ /** \see http://en.opensuse.org/Product_Management/Code11/Upgrade */
struct Upgrade
{
public:
@@ -75,6 +76,7 @@ namespace zypp
std::string name() const;
std::string summary() const;
std::string repository() const;
+ std::string product() const;
bool notify() const;
std::string status() const;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org