Author: mlandres Date: Thu May 8 17:13:56 2008 New Revision: 9992 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9992&view=rev Log: Support optional root argument to RepoManagerOptions, to prefix all path names taken from ZConfig. Modified: trunk/libzypp/zypp/RepoManager.cc trunk/libzypp/zypp/RepoManager.h Modified: trunk/libzypp/zypp/RepoManager.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=9992&r1=9991&r2=9992&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.cc (original) +++ trunk/libzypp/zypp/RepoManager.cc Thu May 8 17:13:56 2008 @@ -64,13 +64,13 @@ // /////////////////////////////////////////////////////////////////// - RepoManagerOptions::RepoManagerOptions() + RepoManagerOptions::RepoManagerOptions( const Pathname & root_r ) { - repoCachePath = ZConfig::instance().repoCachePath(); - repoRawCachePath = ZConfig::instance().repoMetadataPath(); - repoSolvCachePath = ZConfig::instance().repoSolvfilesPath(); - repoPackagesCachePath = ZConfig::instance().repoPackagesPath(); - knownReposPath = ZConfig::instance().knownReposPath(); + repoCachePath = Pathname::assertprefix( root_r, ZConfig::instance().repoCachePath() ); + repoRawCachePath = Pathname::assertprefix( root_r, ZConfig::instance().repoMetadataPath() ); + repoSolvCachePath = Pathname::assertprefix( root_r, ZConfig::instance().repoSolvfilesPath() ); + repoPackagesCachePath = Pathname::assertprefix( root_r, ZConfig::instance().repoPackagesPath() ); + knownReposPath = Pathname::assertprefix( root_r, ZConfig::instance().knownReposPath() ); probe = ZConfig::instance().repo_add_probe(); } Modified: trunk/libzypp/zypp/RepoManager.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.h?rev=9992&r1=9991&r2=9992&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.h (original) +++ trunk/libzypp/zypp/RepoManager.h Thu May 8 17:13:56 2008 @@ -47,8 +47,18 @@ */ struct RepoManagerOptions { - /** Default ctor following \ref ZConfig global settings. */ - RepoManagerOptions(); + /** Default ctor following \ref ZConfig global settings. + * If an optional \c root_r directory is given, all paths will + * be prefixed accordingly. + * \code + * root_r\repoCachePath + * \repoRawCachePath + * \repoSolvCachePath + * \repoPackagesCachePath + * \knownReposPath + * \endcode + */ + RepoManagerOptions( const Pathname & root_r = Pathname() ); /** Test setup adjusting all paths to be located below one \c root_r directory. * \code @@ -58,7 +68,7 @@ * \packages - repoPackagesCachePath * \repos.d - knownReposPath * \endcode - */ + */ static RepoManagerOptions makeTestSetup( const Pathname & root_r ); Pathname repoCachePath; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org