13#include <zypp/base/LogTools.h>
14#include <zypp/base/Regex.h>
16#include <zypp-core/base/UserRequestException>
17#include <zypp-media/MediaException>
20#include <zypp/PathInfo.h>
21#include <zypp/TmpPath.h>
24#undef ZYPP_BASE_LOGGER_LOGGROUP
25#define ZYPP_BASE_LOGGER_LOGGROUP "zypp::fetcher"
39 : _url(
std::move(url))
46 : _url(
std::move(url))
91 DBG <<
"Going to release file " << file
92 <<
" from media number " <<
media_nr << endl;
240 for (
const auto &
resource : files ) {
245 MIL <<
"Skipping precache of file " <<
resource.filename() <<
" media is not open";
260 const auto &file(
resource.filename());
275 DBG <<
"Going to try to provide " << (
resource.optional() ?
"optional" :
"") <<
" file " << file
276 <<
" from media number " <<
media_nr << endl;
288 std::vector<std::string>
devices;
317 MIL <<
"Can't provide file. Non-Interactive mode." << endl;
325 user = report->requestMedia (
330 excp.asUserHistory(),
336 MIL <<
"ProvideFile exception caught, callback answer: " << user << endl;
340 DBG <<
"Aborting" << endl;
347 DBG <<
"Skipping" << endl;
354 DBG <<
"Eject: try to release" << endl;
369 DBG <<
"Going to try again" << endl;
380 DBG <<
"Don't know, let's ABORT" << endl;
435 WAR <<
"Verifier not found" << endl;
444 std::string scheme =
url_r.getScheme();
445 if (scheme ==
"cd" || scheme ==
"dvd")
448 DBG <<
"Rewriting url " <<
url_r << endl;
464 DBG <<
"Url rewrite result: " << url << endl;
470 std::string pathname =
url_r.getPathName();
478 DBG <<
"Url rewrite result: " << url << endl;
487 DBG <<
"Releasing all media IDs held by this MediaSetAccess" << endl;
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Base class for Exception.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
void setPathName(const std::string &path, EEncoding eflag=zypp::url::E_DECODED)
Set the path name.
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
const std::string & asString() const
String representation.
static ManagedFile asManagedFile()
Create a temporary file and convert it to a automatically cleaned up ManagedFile.
@ icase
Do not differentiate case.
Regular expression match result.
String related utilities and Regular expression matching.
std::list< DirEntry > DirContent
Returned by readdir.
int hardlinkCopy(const Pathname &oldpath, const Pathname &newpath)
Create newpath as hardlink or copy of oldpath.
std::string numstring(char n, int w=0)
bool regex_match(const std::string &s, smatch &matches, const regex ®ex)
\relates regex \ingroup ZYPP_STR_REGEX \relates regex \ingroup ZYPP_STR_REGEX
Easy-to use interface to the ZYPP dependency resolver.
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
void operator()(media::MediaAccessId media, const OnMediaLocation &file)
void operator()(media::MediaAccessId media, const OnMediaLocation &file)
void operator()(media::MediaAccessId media, const OnMediaLocation &file)
ProvideFileExistenceOperation()
void operator()(media::MediaAccessId media, const OnMediaLocation &file)
Wrapper for const correct access via Smart pointer types.
#define ZYPP_RETHROW(EXCPT)
Drops a logline and rethrows, updating the CodeLocation.
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
#define IMPL_PTR_TYPE(NAME)