11 #include <zypp/ng/Context> 19 template<
typename ZyppContextRefType>
22 , _repoManager(
std::move(repoManager) )
23 , _repoInfo(
std::move(info) )
24 , _rawCachePath(
std::move(rawCachePath) )
25 , _tmpDir(
std::move(tempDir) )
27 if ( _repoManager->pluginRepoverification().checkIfNeeded() )
28 _pluginRepoverification = _repoManager->pluginRepoverification();
31 template<
typename ZyppContextRefType>
34 using namespace operators;
36 using CtxRefType = RefreshContextRef<ZyppContextRefType>;
42 if( tmpdir.
path().
empty() && geteuid() != 0 ) {
49 MIL <<
"Creating RefreshContext " << std::endl;
52 , std::move(zyppContext)
54 , std::move(rawCachePath)
56 , std::move(repoManager)));
60 template<
typename ZyppContextRefType>
63 MIL <<
"Deleting RefreshContext" << std::endl;
66 template<
typename ZyppContextRefType>
81 template<
typename ZyppContextRefType>
87 template<
typename ZyppContextRefType>
90 return _tmpDir.path();
93 template<
typename ZyppContextRefType>
99 template<
typename ZyppContextRefType>
105 template<
typename ZyppContextRefType>
111 template<
typename ZyppContextRefType>
117 template<
typename ZyppContextRefType>
120 return _repoManager->options();
123 template<
typename ZyppContextRefType>
129 template<
typename ZyppContextRefType>
135 template<
typename ZyppContextRefType>
138 return _pluginRepoverification;
141 template<
typename ZyppContextRefType>
144 if ( _probedType && *_probedType == rType )
148 _sigProbedTypeChanged.emit(rType);
151 template<
typename ZyppContextRefType>
157 template<
typename ZyppContextRefType>
160 return _sigProbedTypeChanged;
int exchange(const Pathname &lpath, const Pathname &rpath)
Exchanges two files or directories.
static TmpDir makeSibling(const Pathname &sibling_r)
Provide a new empty temporary directory as sibling.
What is known about a repository.
#define ZYPP_EXCPT_PTR(EXCPT)
Drops a logline and returns Exception as a std::exception_ptr.
ZyppContextRefType _zyppContext
int hardlinkCopy(const Pathname &oldpath, const Pathname &newpath)
Create newpath as hardlink or copy of oldpath.
bool empty() const
Test for an empty path.
Provide a new empty temporary directory and recursively delete it when no longer needed.
static constexpr const char * cacheFileName()
static expected success(ConsParams &&...params)
zypp::RepoManagerFlags::CacheBuildPolicy _policy
Base class for Exception.
zypp_private::repo::PluginRepoverification PluginRepoverification
auto and_then(Fun &&function)
static constexpr const char * cookieFileName()
Wrapper class for ::stat/::lstat.
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.
Repository type enumeration.