Cleanup and remove deprecated interface methods
authorMichael Andres <ma@suse.de>
Thu, 4 Jun 2009 13:42:11 +0000 (15:42 +0200)
committerMichael Andres <ma@suse.de>
Thu, 4 Jun 2009 13:42:11 +0000 (15:42 +0200)
28 files changed:
tests/zypp/MediaSetAccess_test.cc
zypp/CMakeLists.txt
zypp/MediaProducts.h
zypp/MediaSetAccess.cc
zypp/MediaSetAccess.h
zypp/Patch.h
zypp/PoolQuery.h
zypp/Product.h
zypp/RepoManager.cc
zypp/ResObject.h
zypp/Target.cc
zypp/Target.h
zypp/ZConfig.cc
zypp/ZConfig.h
zypp/base/Regex.h
zypp/dummy.cc [deleted file]
zypp/media/CredentialFileReader.cc
zypp/media/MediaISO.cc
zypp/media/MediaManager.cc
zypp/media/MediaManager.h
zypp/media/MediaNFS.cc
zypp/media/MediaNFS.h
zypp/media/MediaSMB.cc
zypp/media/MediaSMB.h
zypp/media/MediaUserAuth.h
zypp/repo/dummy.cc [deleted file]
zypp/sat/AttrMatcher.h
zypp/target/TargetImpl.cc

index c9efc6e..fc4dd14 100644 (file)
@@ -215,7 +215,7 @@ BOOST_AUTO_TEST_CASE(msa_provide_dir)
  */
 BOOST_AUTO_TEST_CASE(msa_provide_dirtree)
 {
-  Url url = (DATADIR + "/src1/cd1").asUrl(); 
+  Url url = (DATADIR + "/src1/cd1").asUrl();
   MediaSetAccess setaccess(url);
 
   Pathname dir = setaccess.provideDir("/dir", true, 1);
@@ -231,28 +231,11 @@ BOOST_AUTO_TEST_CASE(msa_provide_dirtree)
 }
 
 /*
- * Provide optional file
- */
-BOOST_AUTO_TEST_CASE(msa_provide_optional_file)
-{
-  Url url = (DATADIR + "/src1/cd1").asUrl(); 
-  MediaSetAccess setaccess(url);
-
-  // must not throw
-  BOOST_CHECK(setaccess.provideOptionalFile("/foo", 1).empty() == true);
-
-  Pathname file = setaccess.provideOptionalFile("/test.txt", 1);
-  BOOST_CHECK(check_file_exists(file) == true);
-  
-  //! \todo test provideOptionalFile with not desired media
-}
-
-/*
  * file exists local
  */
 BOOST_AUTO_TEST_CASE(msa_file_exist_local)
 {
-  Url url = (DATADIR + "/src1/cd1").asUrl(); 
+  Url url = (DATADIR + "/src1/cd1").asUrl();
   MediaSetAccess setaccess(url);
 
   BOOST_CHECK(setaccess.doesFileExist("/test.txt"));
@@ -272,9 +255,9 @@ BOOST_AUTO_TEST_CASE(msa_remote_tests)
   BOOST_CHECK(setaccess.doesFileExist("/test.txt"));
 
   // check providing a file via http works
-  Pathname local = setaccess.provideFile("/test.txt");  
+  Pathname local = setaccess.provideFile("/test.txt");
   BOOST_CHECK(CheckSum::sha1(sha1sum(local)) == CheckSum::sha1("2616e23301d7fcf7ac3324142f8c748cd0b6692b"));
-  
+
   // providing a file which does not exist should throw
   BOOST_CHECK_THROW(setaccess.provideFile("/testBADNAME.txt"), media::MediaFileNotFoundException);
   web.stop();
index addd92d..2344cec 100644 (file)
@@ -19,7 +19,6 @@ SET( zypp_SRCS
   Digest.cc
   DiskUsage.cc
   DiskUsageCounter.cc
-  dummy.cc
   Edition.cc
   ExternalProgram.cc
   Fetcher.cc
@@ -697,7 +696,6 @@ INSTALL(  FILES
 )
 
 SET( zypp_repo_SRCS
-  repo/dummy.cc
   repo/RepoException.cc
   repo/RepoType.cc
   repo/ServiceType.cc
index 909be27..2a6bd9b 100644 (file)
@@ -31,7 +31,7 @@ namespace zypp
   {
     Pathname    _dir;
     std::string _name;
-    
+
     /**
      * \short Ctor
      */
@@ -39,13 +39,13 @@ namespace zypp
       : _dir(dir_r), _name(name_r)
     {
     }
-    
+
     bool operator<( const MediaProductEntry &rhs ) const
     {
       return ( _name < rhs._name );
     }
   };
-  
+
   /**
    * A set of available products in media
    */
@@ -59,7 +59,7 @@ namespace zypp
   {
     std::ifstream pfile( file_r.asString().c_str() );
     while ( pfile.good() ) {
-  
+
       std::string value = str::getline( pfile, str::TRIM );
       if ( pfile.bad() ) {
         ERR << "Error parsing " << file_r << std::endl;
@@ -69,13 +69,13 @@ namespace zypp
         break; // no data on last line
       }
       std::string tag = str::stripFirstWord( value, true );
-  
+
       if ( tag.size() ) {
         *result = MediaProductEntry( tag, value );
       }
     }
   }
-  
+
   /**
    * \short Available products in a url location
    *
@@ -90,9 +90,9 @@ namespace zypp
     media::MediaManager media_mgr;
     // open the media
     media::MediaId id = media_mgr.open(url_r);
-    media_mgr.attachDesiredMedia(id);
+    media_mgr.attach(id);
     Pathname products_file = Pathname("media.1/products");
-  
+
     try  {
       media_mgr.provideFile (id, products_file);
       products_file = media_mgr.localPath (id, products_file);
@@ -104,7 +104,7 @@ namespace zypp
     }
     media_mgr.release(id, "");
  }
+
  /**
    * \short Available products in a url location
    *
index 0689cb7..38a2a5e 100644 (file)
@@ -62,8 +62,6 @@ IMPL_PTR_TYPE(MediaSetAccess);
       media_mgr.addVerifier( id, verifier );
       // remove any saved verifier for this media
       _verifiers.erase(media_nr);
-      //if (! noattach && ! media_mgr.isAttached(id))
-      //media_mgr.attach(id);
     }
     else
     {
@@ -73,16 +71,6 @@ IMPL_PTR_TYPE(MediaSetAccess);
     }
   }
 
-//       callback::SendReport<source::DownloadFileReport> report;
-//       DownloadProgressFileReceiver download_report( report );
-//       SourceFactory source_factory;
-//       Url file_url( url().asString() + file_r.asString() );
-//       report->start( source_factory.createFrom(this), file_url );
-//       callback::TempConnect<media::DownloadProgressReport> tmp_download( download_report );
-//       Pathname file = provideJustFile( file_r, media_nr, cached, checkonly );
-//       report->finish( file_url, source::DownloadFileReport::NO_ERROR, "" );
-//       return file;
-
   void MediaSetAccess::releaseFile( const OnMediaLocation & on_media_file )
   {
     releaseFile( on_media_file.filename(), on_media_file.medianr() );
@@ -112,7 +100,7 @@ IMPL_PTR_TYPE(MediaSetAccess);
 
     // try to attach the media
     if ( ! media_mgr.isAttached(media) )
-        media_mgr.attachDesiredMedia(media);
+        media_mgr.attach(media);
 
     media_mgr.dirInfo(media, retlist, dirname, dots);
   }
@@ -127,7 +115,7 @@ IMPL_PTR_TYPE(MediaSetAccess);
       result = media_mgr.localPath(media, file);
     }
   };
-          
+
   struct ProvideDirTreeOperation
   {
     Pathname result;
@@ -153,15 +141,15 @@ IMPL_PTR_TYPE(MediaSetAccess);
   struct ProvideFileExistenceOperation
   {
     bool result;
-    ProvideFileExistenceOperation() 
-        : result(false) 
+    ProvideFileExistenceOperation()
+        : result(false)
     {}
-      
+
     void operator()( media::MediaAccessId media, const Pathname &file )
     {
       media::MediaManager media_mgr;
       result = media_mgr.doesFileExist(media, file);
-    }      
+    }
   };
 
 
@@ -182,22 +170,6 @@ IMPL_PTR_TYPE(MediaSetAccess);
     return op.result;
   }
 
-  Pathname MediaSetAccess::provideOptionalFile(const Pathname & file, unsigned media_nr )
-  {
-    OnMediaLocation resource;
-    ProvideFileOperation op;
-    resource.setLocation(file, media_nr);
-    try {
-        provide(boost::ref(op), resource, PROVIDE_NON_INTERACTIVE);
-    }
-    catch ( const Exception &e )
-    {
-        ZYPP_CAUGHT(e);
-    }
-    return op.result;
-  }
-
-
   bool MediaSetAccess::doesFileExist(const Pathname & file, unsigned media_nr )
   {
     ProvideFileExistenceOperation op;
@@ -213,7 +185,7 @@ IMPL_PTR_TYPE(MediaSetAccess);
   {
     Pathname file(resource.filename());
     unsigned media_nr(resource.medianr());
-      
+
     callback::SendReport<media::MediaChangeReport> report;
     media::MediaManager media_mgr;
 
@@ -230,7 +202,7 @@ IMPL_PTR_TYPE(MediaSetAccess);
             << " from media number " << media_nr << endl;
         // try to attach the media
         if ( ! media_mgr.isAttached(media) )
-          media_mgr.attachDesiredMedia(media);
+          media_mgr.attach(media);
         op(media, file);
         break;
       }
@@ -362,7 +334,7 @@ IMPL_PTR_TYPE(MediaSetAccess);
     }
     ProvideDirOperation op;
     provide( boost::ref(op), resource, options);
-    return op.result;    
+    return op.result;
   }
 
   media::MediaAccessId MediaSetAccess::getMediaAccessId (media::MediaNr medianr)
@@ -372,8 +344,6 @@ IMPL_PTR_TYPE(MediaSetAccess);
     if (_medias.find(medianr) != _medias.end())
     {
       media::MediaAccessId id = _medias[medianr];
-      //if (! noattach && ! media_mgr.isAttached(id))
-      //media_mgr.attach(id);
       return id;
     }
     Url url;
@@ -463,9 +433,6 @@ IMPL_PTR_TYPE(MediaSetAccess);
     return str;
   }
 
-//     media::MediaVerifierRef MediaSetAccess::verifier(unsigned media_nr)
-//     { return media::MediaVerifierRef(new media::NoVerifier()); }
-
 /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 24d5b5d..7ec1ff4 100644 (file)
@@ -167,23 +167,6 @@ namespace zypp
       Pathname provideFile(const Pathname & file, unsigned media_nr = 1, ProvideFileOptions options = PROVIDE_DEFAULT );
 
       /**
-       * \deprecated
-       * The same as provideFile(Pathname,unsigned) but this method does not
-       * call the user callbacks, except of the case of
-       * wrong media in the drive, and it won't throw an exception in any case.
-       *
-       * \return Path to the provided file on success, an empty Pathname() otherwise.
-       * This method is obsolete.
-       *
-       * To avoid interaction with the user, 
-       * use \ref provideFile with \ref ProvideFileOptions::NON_INTERACTIVE
-       * as an option. However you need to handle the exceptions yourself
-       * in case of error. If you need ignore functionality, try
-       * \ref Fetcher and set \ref OnMediaLocation::setOptional 
-       */
-      ZYPP_DEPRECATED Pathname provideOptionalFile( const Pathname & file, unsigned media_nr = 1 );
-
-      /**
        * Release file from media.
        * This signal that file is not needed anymore.
        *
index cd1bc05..867e506 100644 (file)
@@ -93,18 +93,6 @@ namespace zypp
       std::string message( const Locale & lang_r = Locale() ) const;
 
       /**
-       * Use \ref rebootSuggested()
-       */
-      ZYPP_DEPRECATED bool reboot_needed() const
-      { return rebootSuggested(); }
-
-      /**
-       * Use \ref restartSuggested()
-       */
-      ZYPP_DEPRECATED bool affects_pkg_manager() const
-      { return restartSuggested(); }
-
-      /**
        * Is the patch installation interactive? (does it need user input?)
        */
       bool interactive() const;
@@ -130,13 +118,6 @@ namespace zypp
        */
       ReferenceIterator referencesEnd() const;
 
-    public:
-      /** Patch ID
-       * \deprecated Seems to be unsused autobuild interal data?
-      */
-      ZYPP_DEPRECATED std::string id() const
-      { return std::string(); }
-
     protected:
       friend Ptr make<Self>( const sat::Solvable & solvable_r );
       /** Ctor */
index cd80ffc..032650c 100644 (file)
@@ -454,19 +454,6 @@ namespace zypp
 
   public:
     class Impl;
-
-    /** \deprecated unused, buggy and useless. */
-    ZYPP_DEPRECATED void setMatchFiles() {}
-    /** \deprecated unused, buggy and useless. */
-    ZYPP_DEPRECATED bool matchFiles() const { return false; }
-    /** \deprecated There should be no need for this internal value. To
-     * switch across all match mode types, use the enum values returned
-     * by \ref matchMode().  \see \ref Match::Mode.
-     *
-     */
-    ZYPP_DEPRECATED int  matchType() const { return flags().modeval(); }
-
-
   private:
     /** Pointer to implementation */
     RW_pointer<Impl> _pimpl;
index 1e1a9d7..f25ecc3 100644 (file)
@@ -67,7 +67,7 @@ namespace zypp
     /** The product flavor (LiveCD Demo, FTP edition,...). */
     std::string flavor() const;
 
-    /** Get the product type (base, add-on)
+    /** Get the product type
      * Well, in an ideal world there is only one base product.
      * It's the installed product denoted by a symlink in
      * \c /etc/products.d.
index 9ab4b3d..59969d8 100644 (file)
@@ -72,7 +72,7 @@ namespace zypp
         {
           media::MediaManager mediamanager;
           _mid = mediamanager.open( url_r );
-          mediamanager.attachDesiredMedia( _mid );
+          mediamanager.attach( _mid );
         }
 
         /** Ctor releases the media. */
@@ -1791,7 +1791,7 @@ namespace zypp
     // download the repo index file
     media::MediaManager mediamanager;
     media::MediaAccessId mid = mediamanager.open( service.url() );
-    mediamanager.attachDesiredMedia( mid );
+    mediamanager.attach( mid );
     mediamanager.provideFile( mid, "repo/repoindex.xml" );
     Pathname path = mediamanager.localPath(mid, "repo/repoindex.xml" );
 
index 514ee15..d508dfe 100644 (file)
@@ -153,10 +153,6 @@ namespace zypp
 
     /** Installed size. */
     ByteCount installSize() const;
-    /** \deprecated Use installSize which is more precise.*/
-    ZYPP_DEPRECATED ByteCount installsize() const { return installSize(); }
-    /** \deprecated Use installSize which is more precise. */
-    ZYPP_DEPRECATED ByteCount size() const { return installSize(); }
 
     /** Size of the rpm package. */
     ByteCount downloadSize() const;
index c50bbf4..fc219f4 100644 (file)
@@ -94,9 +94,6 @@ namespace zypp
   Date Target::timestamp() const
   { return _pimpl->timestamp(); }
 
-  std::string Target::release() const
-  { return _pimpl->release(); }
-
   std::string Target::distributionFlavor() const
   { return _pimpl->distributionFlavor(); }
 
@@ -114,7 +111,7 @@ namespace zypp
 
   Product::constPtr Target::baseProduct() const
   { return _pimpl->baseProduct(); }
-    
+
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 2dd9d3c..a463e14 100644 (file)
@@ -76,10 +76,6 @@ namespace zypp
      */
     void unload();
 
-    /** \deprecated NOOP
-    */
-    ZYPP_DEPRECATED void reset() {}
-
     /** Null implementation */
     static Target_Ptr nullimpl();
 
@@ -118,21 +114,13 @@ namespace zypp
      * if you require some base product attributes when the
      * target is not loaded into the pool, see
      * \ref targetDistribution , \ref targetDistributionRelease
-     * and \ref distributionVersion that obtain the data 
+     * and \ref distributionVersion that obtain the data
      * on demand from the installed product information.
      */
     Product::constPtr baseProduct() const;
 
     /** \name Base product and registration. */
     //@{
-    /** The targets distribution release string (/etc/SuSE-release)
-     * \code
-     *   openSUSE 10.3 (i586)
-     * \endcode
-     * \deprecated \ref targetDistribution might be a better choice as it does not depend on /etc/SuSE-release.
-    */
-    std::string release() const ZYPP_DEPRECATED;
-
     /** This is \c register.target attribute of the installed base product.
      * Used for registration and \ref Service refresh.
      */
@@ -150,7 +138,7 @@ namespace zypp
      */
     std::string distributionVersion() const;
     //@}
-    
+
 
     /**
      * This is \flavor attribute of the installed base product
@@ -159,8 +147,8 @@ namespace zypp
      * been loaded, as the value is not present in the system
      * but computer from a package provides
      */
-    std::string distributionFlavor() const;    
-    
+    std::string distributionFlavor() const;
+
     /**
      * anonymous unique id
      *
index 7e17ad0..3b83db4 100644 (file)
@@ -321,11 +321,6 @@ namespace zypp
                 {
                   cfg_vendor_path = Pathname(value);
                 }
-                else if ( entry == "productsdir" )
-                {
-                  WAR << "Deprecated entry 'productsdir=': This locations is no longer used or supported." << endl;
-                  cfg_products_path = Pathname(value);
-                }
                 else if ( entry == "solver.onlyRequires" )
                 {
                   solver_onlyRequires.set( str::strToBool( value, solver_onlyRequires.get() ) );
@@ -425,7 +420,6 @@ namespace zypp
     Pathname cfg_known_repos_path;
     Pathname cfg_known_services_path;
     Pathname cfg_vendor_path;
-    Pathname cfg_products_path;
     Pathname locks_file;
 
     Pathname update_data_path;
@@ -598,12 +592,6 @@ namespace zypp
         ? (configPath()/"vendors.d") : _pimpl->cfg_vendor_path );
   }
 
-  Pathname ZConfig::productsPath() const
-  {
-    return ( _pimpl->cfg_products_path.empty()
-        ? (configPath()/"products.d") : _pimpl->cfg_products_path );
-  }
-
   Pathname ZConfig::locksFile() const
   {
     return ( _pimpl->locks_file.empty()
index 6d66838..02d3726 100644 (file)
@@ -211,13 +211,6 @@ namespace zypp
       Pathname vendorPath() const;
 
       /**
-       * Directory for additional product information  (configPath()/products.d)
-       * \ingroup g_ZC_CONFIGFILES
-       * \deprecated This locations is no longer used or supported.
-       */
-      Pathname productsPath() const ZYPP_DEPRECATED;
-
-      /**
        * Solver regards required packages,patterns,... only
        */
       bool solver_onlyRequires() const;
index a6fe0f6..77424e6 100644 (file)
@@ -31,7 +31,9 @@ namespace zypp
     /** \defgroup ZYPP_STR_REGEX Regular expressions
      *
      * Namespace zypp::str regular expressions \b using the glibc regex library.
-     * 
+     *
+     * \see \ref sat::AttrMatcher string matcher supporing regex, globing, etc.
+     *
      * regex
      * regex_match
      * smatch
@@ -50,6 +52,10 @@ namespace zypp
     inline bool regex_match(const std::string& s, const regex& regex)
     { return regex_match( s.c_str(), regex ); }
 
+    /**
+     * \see \ref sat::AttrMatcher string matcher supporing regex, globing, etc.
+     * \ingroup ZYPP_STR_REGEX
+     */
     class regex {
     public:
 
@@ -96,6 +102,10 @@ namespace zypp
       bool m_valid;
     };
 
+    /**
+     * \ingroup ZYPP_STR_REGEX
+     * \see regex
+     */
     class smatch {
     public:
       smatch();
diff --git a/zypp/dummy.cc b/zypp/dummy.cc
deleted file mode 100644 (file)
index e69de29..0000000
index 13f9a50..853a587 100644 (file)
@@ -33,7 +33,7 @@ namespace zypp
 
   //////////////////////////////////////////////////////////////////////
   //
-  // CLASS NAME : CredentialFileReader 
+  // CLASS NAME : CredentialFileReader
   //
   //////////////////////////////////////////////////////////////////////
 
@@ -61,7 +61,7 @@ namespace zypp
 
       AuthData_Ptr credentials;
       credentials.reset(new AuthData());
-      
+
       // set url
       if (storedUrl.isValid())
         credentials->setUrl(storedUrl);
@@ -71,7 +71,7 @@ namespace zypp
            ++it)
       {
         if (it->first == "username")
-          credentials->setUserName(it->second);
+          credentials->setUsername(it->second);
         else if (it->first == "password")
           credentials->setPassword(it->second);
         else
index dc7ea99..3fee74f 100644 (file)
@@ -182,7 +182,7 @@ namespace zypp
         ZYPP_THROW(MediaNotSupportedException(_url));
 
       MediaManager manager;
-      manager.attach(_parentId, false);
+      manager.attach(_parentId);
 
       try
       {
index d4956d4..535110b 100644 (file)
@@ -561,20 +561,7 @@ namespace zypp
     }
 
     // ---------------------------------------------------------------
-    void
-    MediaManager::attach(MediaAccessId accessId, bool next)
-    {
-      MutexLock glock(g_Mutex);
-
-      ManagedMedia &ref( m_impl->findMM(accessId));
-
-      DBG << "attach(id=" << accessId << ")" << std::endl;
-
-      return ref.handler->attach(next);
-    }
-
-    // ---------------------------------------------------------------
-    void MediaManager::attachDesiredMedia(MediaAccessId accessId)
+    void MediaManager::attach(MediaAccessId accessId)
     {
       MutexLock glock(g_Mutex);
 
index 84fc725..65c3d01 100644 (file)
@@ -216,7 +216,7 @@ namespace zypp
      *       Mandatory parameter specifying the name of the block device of
      *       the partition to mount.
      *     - <tt>filesystem</tt>:
-     *       The name of the filesystem. Defaults to "auto". 
+     *       The name of the filesystem. Defaults to "auto".
      *   - Authority:
      *     A non-empty authority URL component is not allowed.
      *   - Path name:
@@ -234,7 +234,7 @@ namespace zypp
      *       "file:/directory/name"
      *     \endcode
      *   - Query parameters:
-     *     none 
+     *     none
      *   - Authority:
      *     A non-empty authority URL component (e.g. containing
      *     a host name) is not allowed.
@@ -253,7 +253,7 @@ namespace zypp
      *
      *       "iso:/?iso=CD1.iso&url=nfs://server/path/to/media"
      *       "iso:/?iso=CD1.iso&url=hd:/?device=/dev/hda"
-     * 
+     *
      *        "iso:/subdir?iso=DVD1.iso&url=nfs://nfs-server/directory&mnt=/nfs/attach/point&filesystem=udf"
      *     \endcode
      *   - Query parameters:
@@ -271,7 +271,7 @@ namespace zypp
      *       source media url.
      *     - <tt>filesystem</tt>:
      *       Optional name of the filesystem used in the iso file. Defaults
-     *       to "auto". 
+     *       to "auto".
      *   - Authority:
      *     A non-empty authority URL component is not allowed.
      *   - Path name:
@@ -334,7 +334,7 @@ namespace zypp
      *     Mandatory URL component, that specifies the share name with
      *     optional subdirectory, where the desired files are located.
      *
-     * \subsection MediaCurl_Url MediaCurl - FTP/HTTP directory tree (ftp, http, https) 
+     * \subsection MediaCurl_Url MediaCurl - FTP/HTTP directory tree (ftp, http, https)
      * The access handler to media directory tree on a ftp/http server.
      *   - Scheme:
      *     - <b>ftp</b>
@@ -390,11 +390,11 @@ namespace zypp
      *         enables ssl verify, this is the default
      *         and is equivalent to 'host,peer'.
      *       - 'host': The server is considered the intended one, when the
-     *         'Common Name' field or a 'Subject Alternate Name' field in 
+     *         'Common Name' field or a 'Subject Alternate Name' field in
      *         the certificate matches the host name in the URL.
      *       - 'peer': Verifies whether the certificate provided by the
      *         server is authentic against the chain of digital signatures
-     *         found in <tt>ssl_capath</tt>. 
+     *         found in <tt>ssl_capath</tt>.
      *     - <tt>timeout</tt>:
      *       Transfer timeout in seconds between 0 and 3600, 0 disables
      *       the timeout, default timeout is 180 seconds.
@@ -402,7 +402,7 @@ namespace zypp
      *       method names to use: 'basic', 'digest', 'ntlm', 'negotiate',
      *       'spnego', 'gssnego'.
      *       Note, that this list depends on the list of methods supported
-     *       by the curl library. 
+     *       by the curl library.
      *   - Authority:
      *     The authority component has to provide a hostname. Optionally
      *     also a username and password. In case of the 'ftp' scheme,
@@ -567,22 +567,20 @@ namespace zypp
       setAttachPrefix(const Pathname &attach_prefix);
 
       /**
-       * Attach the media using the concrete handler.
+       * Attach the media using the concrete handler (checks all devices).
        *
        * Remember to release() or close() each id you've attached
        * and not need any more. Attach is like an open of a file!
        *
        * \param accessId A media access id.
-       * \param next     Whether to try the next drive if avaliable.
        * \throws MediaNotOpenException for invalid access id.
-       * \deprecated in favor of attachDesiredMedia(MediaAccessId) which looks
-       *   for a desirable media on all available devices.
        */
       void
-      attach(MediaAccessId accessId, bool next = false) ZYPP_DEPRECATED;
+      attach(MediaAccessId accessId);
 
-      void
-      attachDesiredMedia(MediaAccessId accessId);
+      /** \deprecated Simply use \ref attach. */
+      ZYPP_DEPRECATED void attachDesiredMedia(MediaAccessId accessId)
+      { attach( accessId ); }
 
       /**
        * Release the attached media and optionally eject.
@@ -590,7 +588,7 @@ namespace zypp
        * If the \p ejectDev parameter is not empty all other access
        * id's are released and the specified drive (CD/DVD drive) is
        * ejected.
-       * 
+       *
        * \param accessId A media access id.
        * \param ejectDev Device to eject. None if empty.
        * \throws MediaNotOpenException for invalid access id.
@@ -672,8 +670,8 @@ namespace zypp
        * Simple check, based on media's URL scheme, telling whether the
        * it is possible to physically change the media inside its drive, like
        * CDs or DVDs. Useful to decide whether to request media change from
-       * user or not. 
-       * 
+       * user or not.
+       *
        * \param accessId The media access id.
        * \return <tt>false</tt> if the media is not changeable,
        *         <tt>true</tt> otherwise.
@@ -798,7 +796,7 @@ namespace zypp
        * Fill in a vector of detected ejectable devices and the index of the
        * currently attached device within the vector. The contents of the vector
        * are the device names (/dev/cdrom and such).
-       * 
+       *
        * \param accessId Medium id.
        * \param devices  vector to load with the device names
        * \param index    index of the currently used device in the devices vector
@@ -835,7 +833,7 @@ namespace zypp
       bool
       isUseableAttachPoint(const Pathname &path,
                            bool            mtab=true) const;
-      
+
     private:
       friend class MediaHandler;
 
index 1ed1269..ec34874 100644 (file)
@@ -30,7 +30,7 @@ namespace zypp {
     // CLASS NAME : MediaNFS
     //
     ///////////////////////////////////////////////////////////////////
-    
+
     ///////////////////////////////////////////////////////////////////
     //
     //
@@ -187,19 +187,6 @@ namespace zypp {
     ///////////////////////////////////////////////////////////////////
     //
     //
-    // METHOD NAME : MediaNFS::releaseFrom
-    // METHOD TYPE : PMError
-    //
-    // DESCRIPTION : Asserted that media is attached.
-    //
-    void MediaNFS::releaseFrom( bool eject )
-    {
-      releaseFrom( "" );
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    //
     //  METHOD NAME : MediaNFS::releaseFrom
     //  METHOD TYPE : void
     //
@@ -222,7 +209,7 @@ namespace zypp {
     {
       MediaHandler::getFile( filename );;
     }
-    
+
     ///////////////////////////////////////////////////////////////////
     //
     // METHOD NAME : MediaNFS::getDir
@@ -234,7 +221,7 @@ namespace zypp {
     {
       MediaHandler::getDir( dirname, recurse_r );
     }
-    
+
     ///////////////////////////////////////////////////////////////////
     //
     //
@@ -248,7 +235,7 @@ namespace zypp {
     {
       MediaHandler::getDirInfo( retlist, dirname, dots );
     }
-    
+
     ///////////////////////////////////////////////////////////////////
     //
     //
@@ -266,8 +253,8 @@ namespace zypp {
     bool MediaNFS::getDoesFileExist( const Pathname & filename ) const
     {
       return MediaHandler::getDoesFileExist( filename );
-    }    
+    }
+
 
-    
   } // namespace media
 } // namespace zypp
index 10d1478..eea5daf 100644 (file)
@@ -38,9 +38,7 @@ namespace zypp {
       protected:
 
        virtual void attachTo (bool next = false);
-       
-       /** \deprecated in favor of releaseFrom(string&) */
-       virtual void releaseFrom( bool eject ) ZYPP_DEPRECATED;
+
         virtual void releaseFrom( const std::string & ejectDev );
        virtual void getFile( const Pathname & filename ) const;
        virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
index 8ba2b9d..84b4fd5 100644 (file)
@@ -341,12 +341,6 @@ namespace zypp {
       mount.umount(attachPoint().asString());
     }
 
-    // deprecated
-    void MediaSMB::releaseFrom( bool eject )
-    {
-      releaseFrom( "" );
-    }
-
     ///////////////////////////////////////////////////////////////////
     //
     // METHOD NAME : MediaSMB::getFile
index 04cf836..41d3f11 100644 (file)
@@ -44,8 +44,6 @@ namespace zypp {
     protected:
 
       virtual void attachTo (bool next = false);
-      /** \deprecated in favor of releaseFrom(string&) */
-      virtual void releaseFrom( bool eject ) ZYPP_DEPRECATED;
       virtual void releaseFrom( const std::string & ejectDev );
       virtual void getFile( const Pathname & filename ) const;
       virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
index 252e591..afa58de 100644 (file)
@@ -46,19 +46,17 @@ public:
   /**
    * Checks validity of authentication data.
    * \return true if the object contains non-empty username and
-   *  non-empty password, false otherwise.  
+   *  non-empty password, false otherwise.
    */
   virtual bool valid() const;
 
   void setUrl(const Url & url) { _url = url; }
   void setUsername(const std::string & username) { _username = username; }
-  /** \deprecated use setUsername() instead */
-  ZYPP_DEPRECATED void setUserName(const std::string & username) { _username = username; }
-  void setPassword(const std::string & password) { _password = password; }  
+  void setPassword(const std::string & password) { _password = password; }
 
   Url url() const { return _url; }
   std::string username() const { return _username; }
-  std::string password() const { return _password; } 
+  std::string password() const { return _password; }
 
   virtual std::ostream & dumpOn( std::ostream & str ) const;
 
@@ -105,7 +103,7 @@ public:
   /**
    * Checks validity of authentication data.
    * \return true if the object contains non-empty username,
-   *  non-empty password, and specifies authentication type; false otherwise.  
+   *  non-empty password, and specifies authentication type; false otherwise.
    */
   virtual bool valid() const;
 
@@ -132,7 +130,7 @@ public:
   long authType() { return _auth_type; } const
   std::string authTypeAsString() { return _auth_type_str; } const
 
-  std::string getUserPwd() const { return username() + ":" + password(); } 
+  std::string getUserPwd() const { return username() + ":" + password(); }
 
 
   /**
@@ -140,7 +138,7 @@ public:
    * into a long of ORed CURLAUTH_* identifiers.
    * The method also automatically leaves out any auth types declared
    * not supported by curl_version_info().
-   * 
+   *
    * \throws MediaException if an invalid authentication type name is
    *         encountered.
    */
diff --git a/zypp/repo/dummy.cc b/zypp/repo/dummy.cc
deleted file mode 100644 (file)
index e69de29..0000000
index 155733a..9b3bc64 100644 (file)
@@ -34,8 +34,6 @@ namespace zypp
   //
   /** String matching option flags as used e.g. by \ref sat::AttrMatcher.
    *
-   *
-   *
    * \code
    * Match mode( Match::GLOB | Match::NOCASE );
    * \endcode
index 92ff04e..5513bea 100644 (file)
@@ -1019,21 +1019,6 @@ namespace zypp
 
     ///////////////////////////////////////////////////////////////////
 
-    std::string TargetImpl::release() const
-    {
-      std::ifstream suseRelease( (_root / "/etc/SuSE-release").c_str() );
-      for( iostr::EachLine in( suseRelease ); in; in.next() )
-      {
-        std::string line( str::trim( *in ) );
-        if ( ! line.empty() )
-          return line;
-      }
-
-      return _("Unknown Distribution");
-    }
-
-    ///////////////////////////////////////////////////////////////////
-
     Product::constPtr TargetImpl::baseProduct() const
     {
       ResPool pool(ResPool::instance());