11#include <zypp/ng/Context>
18 template<
typename ZyppContextRefType>
21 , _repoManager(
std::move(repoManager) )
22 , _repoInfo(
std::move(info) )
23 , _rawCachePath(
std::move(rawCachePath) )
24 , _tmpDir(
std::move(tempDir) )
27 template<
typename ZyppContextRefType>
30 using namespace operators;
32 using CtxRefType = RefreshContextRef<ZyppContextRefType>;
38 if( tmpdir.
path().
empty() && geteuid() != 0 ) {
45 MIL <<
"Creating RefreshContext " << std::endl;
48 , std::move(zyppContext)
50 , std::move(rawCachePath)
52 , std::move(repoManager)));
56 template<
typename ZyppContextRefType>
59 MIL <<
"Deleting RefreshContext" << std::endl;
62 template<
typename ZyppContextRefType>
68 template<
typename ZyppContextRefType>
74 template<
typename ZyppContextRefType>
77 return _tmpDir.path();
80 template<
typename ZyppContextRefType>
86 template<
typename ZyppContextRefType>
92 template<
typename ZyppContextRefType>
98 template<
typename ZyppContextRefType>
104 template<
typename ZyppContextRefType>
107 return _repoManager->options();
110 template<
typename ZyppContextRefType>
116 template<
typename ZyppContextRefType>
122 template<
typename ZyppContextRefType>
125 return _pluginRepoverification;
128 template<
typename ZyppContextRefType>
131 if ( _probedType && *_probedType == rType )
135 _sigProbedTypeChanged.emit(rType);
138 template<
typename ZyppContextRefType>
144 template<
typename ZyppContextRefType>
147 return _sigProbedTypeChanged;
Base class for Exception.
What is known about a repository.
bool empty() const
Test for an empty path.
Provide a new empty temporary directory and recursively delete it when no longer needed.
static TmpDir makeSibling(const Pathname &sibling_r)
Provide a new empty temporary directory as sibling.
int exchange(const Pathname &lpath, const Pathname &rpath)
Exchanges two files or directories.
expected< zypp::Pathname > rawcache_path_for_repoinfo(const RepoManagerOptions &opt, const RepoInfo &info)
Calculates the raw cache path for a repository, this is usually /var/cache/zypp/alias.
ResultType and_then(const expected< T, E > &exp, Function &&f)
ZyppContextRefType _zyppContext
zypp::RepoManagerFlags::CacheBuildPolicy _policy
Repository type enumeration.
#define ZYPP_EXCPT_PTR(EXCPT)
Drops a logline and returns Exception as a std::exception_ptr.