11 #include <zypp/ng/Context> 21 , _repoManager(
std::move(repoManager) )
22 , _repoInfo(
std::move(info) )
23 , _rawCachePath(
std::move(rawCachePath) )
24 , _tmpDir(
std::move(tempDir) )
26 if ( _repoManager->pluginRepoverification().checkIfNeeded() )
33 using namespace operators;
35 using CtxRefType = RefreshContextRef;
41 if( tmpdir.
path().
empty() && geteuid() != 0 ) {
48 MIL <<
"Creating RefreshContext " << std::endl;
62 MIL <<
"Deleting RefreshContext" << std::endl;
int exchange(const Pathname &lpath, const Pathname &rpath)
Exchanges two files or directories.
std::optional< PluginRepoverification > _pluginRepoverification
static TmpDir makeSibling(const Pathname &sibling_r)
Provide a new empty temporary directory as sibling.
zypp::Pathname _rawCachePath
void setProbedType(zypp::repo::RepoType rType)
What is known about a repository.
repo::RawMetadataRefreshPolicy _policy
#define ZYPP_EXCPT_PTR(EXCPT)
Drops a logline and returns Exception as a std::exception_ptr.
int hardlinkCopy(const Pathname &oldpath, const Pathname &newpath)
Create newpath as hardlink or copy of oldpath.
Signal< void(zypp::repo::RepoType)> _sigProbedTypeChanged
bool empty() const
Test for an empty path.
SignalProxy< void(zypp::repo::RepoType)> sigProbedTypeChanged()
zypp::Pathname targetDir() const
std::optional< zypp::repo::RepoType > _probedType
Provide a new empty temporary directory and recursively delete it when no longer needed.
static constexpr const char * cacheFileName()
~RefreshContext() override
static expected< repo::RefreshContextRef > create(ContextRef zyppContext, zypp::RepoInfo info, RepoManagerRef repoManager)
zypp::filesystem::TmpDir _tmpDir
static expected success(ConsParams &&...params)
const std::optional< PluginRepoverification > & pluginRepoverification() const
void setPolicy(RawMetadataRefreshPolicy newPolicy)
Base class for Exception.
RepoManagerRef _repoManager
const RepoManagerRef & repoManager() const
static constexpr const char * cookieFileName()
Wrapper class for ::stat/::lstat.
RawMetadataRefreshPolicy policy() const
const ContextRef & zyppContext() const
const std::optional< zypp::repo::RepoType > & probedType() const
ResultType and_then(const expected< T, E > &exp, Function &&f)
const zypp::RepoManagerOptions & repoManagerOptions() const
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.
const zypp::RepoInfo & repoInfo() const
const zypp::Pathname & rawCachePath() const
std::optional< PluginRepoverification > _pluginRepoverification
Repository type enumeration.