propagate installOnly() to zypp::Package interface, us it in target
authorJiri Srain <jsrain@suse.cz>
Mon, 30 Jan 2006 08:48:05 +0000 (08:48 +0000)
committerJiri Srain <jsrain@suse.cz>
Mon, 30 Jan 2006 08:48:05 +0000 (08:48 +0000)
zypp/Package.cc
zypp/Package.h
zypp/detail/PackageImplIf.cc
zypp/detail/PackageImplIf.h
zypp/target/TargetImpl.cc

index cfcf5e2..d98349e 100644 (file)
@@ -173,6 +173,9 @@ namespace zypp
     return source().provideFile(plainRpm()); // never reached
   }
 
+  bool Package::installOnly() const
+  { return pimpl().installOnly(); }
+
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 50c01dc..a6a5be6 100644 (file)
@@ -94,6 +94,8 @@ namespace zypp
      * \throws Exception
      */
     Pathname getPatchRpm(BaseVersion & base_r) const;
+    /** */
+    bool installOnly() const;
 
     // data here:
  
index 61664d6..07d0598 100644 (file)
@@ -95,6 +95,8 @@ namespace zypp
       std::list<PatchRpm> PackageImplIf::patchRpms() const
       { return std::list<PatchRpm>(); }
 
+      bool PackageImplIf::installOnly() const
+      { return false; }
 
     /////////////////////////////////////////////////////////////////
   } // namespace detail
index f9e481c..8dd1fa6 100644 (file)
@@ -108,6 +108,8 @@ namespace zypp
       virtual std::list<DeltaRpm> deltaRpms() const PURE_VIRTUAL;
       /** */
       virtual std::list<PatchRpm> patchRpms() const PURE_VIRTUAL;
+      /** */
+      virtual bool installOnly() const PURE_VIRTUAL;
 
       //@}
 
index e482dc4..8abc830 100644 (file)
@@ -122,7 +122,8 @@ namespace zypp
        if (isKind<Package>(it->resolvable()))
        {
          Package::constPtr p = dynamic_pointer_cast<const Package>(it->resolvable());
-         rpm().installPackage(p->getPlainRpm(), rpm::RpmDb::RPMINST_NOUPGRADE);
+         rpm().installPackage(p->getPlainRpm(),
+           p->installOnly() ? rpm::RpmDb::RPMINST_NOUPGRADE : 0);
        }
       }
     }