add TargetImpl::providesFile()
authorKlaus Kaempf <kkaempf@suse.de>
Tue, 31 Jan 2006 13:57:45 +0000 (13:57 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Tue, 31 Jan 2006 13:57:45 +0000 (13:57 +0000)
zypp/target/TargetImpl.cc
zypp/target/TargetImpl.h

index f5a9866..1c9e171 100644 (file)
@@ -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
   ///////////////////////////////////////////////////////////////////
index 2c6f770..847f5f5 100644 (file)
@@ -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;