libzypp 17.37.17
RepoManagerOptions.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
13#include "RepoManagerOptions.h"
14#include <zypp/ZConfig.h>
15
16namespace zypp
17{
19 //
20 // class RepoManagerOptions
21 //
23
37
39 {
41 ret.repoCachePath = root_r;
42 ret.repoRawCachePath = root_r/"raw";
43 ret.repoSolvCachePath = root_r/"solv";
44 ret.repoPackagesCachePath = root_r/"packages";
45 ret.knownReposPath = root_r/"repos.d";
46 ret.knownServicesPath = root_r/"services.d";
47 ret.pluginsPath = root_r/"plugins";
48 ret.rootDir = root_r;
49 return ret;
50 }
51
52 std::ostream & operator<<( std::ostream & str, const RepoManagerOptions & obj )
53 {
54#define OUTS(X) str << " " #X "\t" << obj.X << std::endl
55 str << "RepoManagerOptions (" << obj.rootDir << ") {" << std::endl;
56 OUTS( repoRawCachePath );
57 OUTS( repoSolvCachePath );
58 OUTS( repoPackagesCachePath );
59 OUTS( knownReposPath );
60 OUTS( knownServicesPath );
61 OUTS( pluginsPath );
62 str << "}" << std::endl;
63#undef OUTS
64 return str;
65 }
66}
#define OUTS(V)
static Pathname assertprefix(const Pathname &root_r, const Pathname &path_r)
Return path_r prefixed with root_r, unless it is already prefixed.
Definition Pathname.cc:272
bool repo_add_probe() const
Whether repository urls should be probed.
Definition ZConfig.cc:1188
static ZConfig & instance()
Singleton ctor.
Definition ZConfig.cc:940
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Repo manager settings.
static RepoManagerOptions makeTestSetup(const Pathname &root_r)
Test setup adjusting all paths to be located below one root_r directory.
Pathname rootDir
remembers root_r value for later use
RepoManagerOptions(const Pathname &root_r=Pathname())
Default ctor following ZConfig global settings.