[zypp-devel] Product type handling
Hi! As I stated today during the meeting, please, update following way the source parsers in ZYPP: For SuSEtags add to the content file TYPE base for the base product; if not present, it is an add-on product For YUM, we already have in the metadata definition attribute type { text }, which should have values "base" or "add-on"; the parser itself has nandling this attribute commented out. The zypp::Product::category should return the type of the product. Since we broke even source-code compatibility of the library as whole anyway, it may make sense to rename it to zypp::Product::type to be consistent with the metadata. Thanks in advance! Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
On Thu, Jul 19, Jiri Srain wrote:
As I stated today during the meeting, please, update following way the source parsers in ZYPP:
For SuSEtags add to the content file
TYPE base
In libzypp-3.13.11: - adapted the SuSEtags content file parser to parse TYPE <stringvalue> - Fixed CacheStore to write the attribute, and ProductImpl to provide it. - Product interface: added /** Get the product type (base, add-on) */ std::string type() const; and deprecated category().
For YUM, we already have in the metadata definition
attribute type { text },
which should have values "base" or "add-on"; the parser itself has nandling this attribute commented out.
- In parser/yum/ProductFileReader.cc: - // TODO what's this? - // _product->? = reader_r->getAttribute("type").asString(); + // product type (base, add-on) + _product->type = reader_r->getAttribute("type").asString(); Hope that's correct. Ask Jano to have a look.
The zypp::Product::category should return the type of the product. Since we broke even source-code compatibility of the library as whole anyway, it may make sense to rename it to zypp::Product::type to be consistent with the metadata.
Done. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (2)
-
Jiri Srain
-
Michael Andres