From 06b9fd7da9329fbf9d46d1279c87dd7e97cc74c6 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Fri, 29 Oct 2010 18:52:12 +0200 Subject: [PATCH] Map patch category strings 'bugfix' and 'enhancement' to categoryEnum values --- zypp/Patch.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/zypp/Patch.cc b/zypp/Patch.cc index 5671ea0..f2a776c 100644 --- a/zypp/Patch.cc +++ b/zypp/Patch.cc @@ -48,11 +48,13 @@ namespace zypp Patch::Category Patch::categoryEnum() const { - static const IdString cat_yast( "yast" ); - static const IdString cat_security( "security" ); - static const IdString cat_recommended( "recommended" ); - static const IdString cat_optional( "optional" ); - static const IdString cat_document( "document" ); + static const IdString cat_yast ( "yast" ); + static const IdString cat_security ( "security" ); + static const IdString cat_recommended ( "recommended" ); + static const IdString cat_bugfix ( "bugfix" ); // rhn + static const IdString cat_optional ( "optional" ); + static const IdString cat_enhancement ( "enhancement" ); // rnh + static const IdString cat_document ( "document" ); // patch category is not poolized in the solv file (i.e. an IdString) ;( IdString cat( sat::LookupAttr( sat::SolvAttr::patchcategory, satSolvable() ).begin().c_str() ); @@ -61,9 +63,9 @@ namespace zypp return CAT_YAST; if ( cat == cat_security ) return CAT_SECURITY; - if ( cat == cat_recommended ) + if ( cat == cat_recommended || cat == cat_bugfix ) return CAT_RECOMMENDED; - if ( cat == cat_optional ) + if ( cat == cat_optional || cat == cat_enhancement ) return CAT_OPTIONAL; if ( cat == cat_document ) return CAT_DOCUMENT; -- 2.7.4