Removed unused and missplaced patch/deltaRpm accessors from Package interface
authorMichael Andres <ma@suse.de>
Tue, 2 May 2006 20:58:04 +0000 (20:58 +0000)
committerMichael Andres <ma@suse.de>
Tue, 2 May 2006 20:58:04 +0000 (20:58 +0000)
zypp/Package.cc
zypp/Package.h

index 671f0c0..2161be3 100644 (file)
@@ -20,7 +20,7 @@ namespace zypp
 { /////////////////////////////////////////////////////////////////
 
   IMPL_PTR_TYPE(Package);
-    
+
   ///////////////////////////////////////////////////////////////////
   //
   //   METHOD NAME : Package::Package
@@ -131,56 +131,6 @@ namespace zypp
   License Package::licenseToConfirm() const
   { return pimpl().licenseToConfirm(); }
 
-  /** */
-  //Pathname Package::plainRpm() const
-  //{ return pimpl().location(); }
-
-  /** */
-  std::list<PatchRpm> Package::patchRpms() const
-  { return pimpl().patchRpms(); }
-
-  /** */
-  std::list<DeltaRpm> Package::deltaRpms() const
-  { return pimpl().deltaRpms(); }
-
-  /** */
-  //Pathname Package::getPlainRpm() const
-  //{ return source().provideFile(plainRpm(), mediaId()); }
-
-  /** */
-  Pathname Package::getDeltaRpm(BaseVersion & base_r) const
-  {
-#warning (2x): TODO: BaseVersion compare checks only Edition
-    std::list<DeltaRpm> deltas = deltaRpms();
-    for (std::list<DeltaRpm>::const_iterator it = deltas.begin();
-         it != deltas.end(); it++)
-    {
-      if (base_r == it->baseVersion())
-       return source().provideFile(it->filename());
-    }
-    ZYPP_THROW(Exception("No matching delta RPM found"));
-    return source().provideFile(location()); // never reached
-  }
-
-  /** */
-  Pathname Package::getPatchRpm(BaseVersion & base_r) const
-  {
-    std::list<PatchRpm> patches = patchRpms();
-    for (std::list<PatchRpm>::const_iterator it = patches.begin();
-         it != patches.end(); it++)
-    {
-      std::list<BaseVersion> bases = it->baseVersions();
-      for (std::list<BaseVersion>::const_iterator bvit = bases.begin();
-          bvit != bases.end(); bvit++)
-      {
-       if (base_r == *bvit)
-         return source().provideFile(it->filename());
-      }
-    }
-    ZYPP_THROW(Exception("No matching patch RPM found"));
-    return source().provideFile(location()); // never reached
-  }
-
   bool Package::installOnly() const
   { return pimpl().installOnly(); }
 
index 6398f69..72ef0bb 100644 (file)
@@ -29,7 +29,7 @@ namespace zypp
   */
   class Package : public ResObject
   {
-    
+
   public:
     typedef detail::PackageImplIf    Impl;
     typedef Package                  Self;
@@ -84,27 +84,10 @@ namespace zypp
 
     /** Disk usage per directory */
     DiskUsage diskusage() const;
-    
+
     /** */
     License licenseToConfirm() const;
-    /** */
-    //Pathname plainRpm() const;
-    /** */
-    std::list<PatchRpm> patchRpms() const;
-    /** */
-    std::list<DeltaRpm> deltaRpms() const;
-    /**
-     * \throws Exception
-     */
-    //Pathname getPlainRpm() const;
-    /**
-     * \throws Exception
-     */
-    Pathname getDeltaRpm(BaseVersion & base_r) const;
-    /**
-     * \throws Exception
-     */
-    Pathname getPatchRpm(BaseVersion & base_r) const;
+
     /** */
     bool installOnly() const;
     /** ID of the media */
@@ -113,7 +96,7 @@ namespace zypp
     Pathname location() const;
 
     // data here:
+
 
   protected:
     Package( const NVRAD & nvrad_r );