From: Klaus Kaempf Date: Tue, 31 Jan 2006 13:57:45 +0000 (+0000) Subject: add TargetImpl::providesFile() X-Git-Tag: 6.6.0~5527 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7961a5e7e4b27c2c148d6ae36d55572c38fcc12b;p=platform%2Fupstream%2Flibzypp.git add TargetImpl::providesFile() --- diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc index f5a98661f..1c9e171ae 100644 --- a/zypp/target/TargetImpl.cc +++ b/zypp/target/TargetImpl.cc @@ -135,6 +135,9 @@ namespace zypp rpm::RpmDb & TargetImpl::rpm() { return _rpm; } + bool TargetImpl::providesFile (const std::string & name_str, const std::string & path_str) const + { return _rpm.hasFile(path_str); } + ///////////////////////////////////////////////////////////////// } // namespace target /////////////////////////////////////////////////////////////////// diff --git a/zypp/target/TargetImpl.h b/zypp/target/TargetImpl.h index 2c6f77021..847f5f5cd 100644 --- a/zypp/target/TargetImpl.h +++ b/zypp/target/TargetImpl.h @@ -65,7 +65,7 @@ namespace zypp #warning Add support for multiple medias - eg. limit only to CD1 void commit(ResPool pool_r); - /** Comomit ordered changes */ + /** Commit ordered changes */ void commit(const PoolItemList & items_r); /** Overload to realize stream output. */ @@ -75,6 +75,10 @@ namespace zypp /** The RPM database */ rpm::RpmDb & rpm(); + /** If the package is installed and provides the file + Needed to evaluate split provides during Resolver::Upgrade() */ + bool providesFile (const std::string & name_str, const std::string & path_str) const; + protected: /** All resolvables provided by the target. */ ResStore _store;