From 7961a5e7e4b27c2c148d6ae36d55572c38fcc12b Mon Sep 17 00:00:00 2001 From: Klaus Kaempf Date: Tue, 31 Jan 2006 13:57:45 +0000 Subject: [PATCH] add TargetImpl::providesFile() --- zypp/target/TargetImpl.cc | 3 +++ zypp/target/TargetImpl.h | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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; -- 2.34.1