X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=zypp%2FProduct.cc;h=d5ef49b47722cee8b082c4cef63c0bf8113c672f;hb=42b5d038414cf4a4a050e816b471f890b24e8032;hp=f195add12bf3a50fe86ebe27289feb4129378cda;hpb=b61a0ff7e76a542a874714e4ee7753db48f9f8aa;p=platform%2Fupstream%2Flibzypp.git diff --git a/zypp/Product.cc b/zypp/Product.cc index f195add..d5ef49b 100644 --- a/zypp/Product.cc +++ b/zypp/Product.cc @@ -91,7 +91,7 @@ namespace zypp { if ( it->repository() == repository() && it->arch() == arch() ) { - bool fitsBuildtime = ( PoolItem(*it)->buildtime() == buildtime() ); + bool fitsBuildtime = ( it->buildtime() == buildtime() ); if ( found ) { bool lowerEdition = ( it->edition() <= found.edition() ); @@ -214,6 +214,19 @@ namespace zypp Date Product::endOfLife() const { return Date( lookupNumAttribute( sat::SolvAttr::productEndOfLife ) );} + bool Product::hasEndOfLife() const + { return( lookupNumAttribute( sat::SolvAttr::productEndOfLife, -1 ) != -1 ); } + + bool Product::hasEndOfLife( Date & value ) const + { + Date res( lookupNumAttribute( sat::SolvAttr::productEndOfLife, -1 ) ); + if ( res == -1 ) + return false; + // else: + value = res; + return true; + } + std::vector Product::updateContentIdentifier() const { std::vector ret;