Go to the documentation of this file.
33 const Pathname & prefered_attach_point)
35 , _prefAttachPoint(prefered_attach_point)
40 const Pathname & prefered_attach_point)
42 , _prefAttachPoint(prefered_attach_point)
51 for (
const auto & mm :
_medias )
52 manager.
close( mm.second );
88 DBG <<
"Going to release file " << file
89 <<
" from media number " << media_nr << endl;
98 bool dots,
unsigned media_nr )
108 media_mgr.
dirInfo(media, retlist, dirname, dots);
165 provide( boost::ref(op), resource, options, deltafile );
196 url.setPathName (
"/");
234 ProvideFileOptions options,
238 unsigned media_nr(resource.
medianr());
249 bool deltafileset =
false;
253 DBG <<
"Going to try to provide " << (resource.
optional() ?
"optional" :
"") <<
" file " << file
254 <<
" from media number " << media_nr << endl;
270 unsigned int devindex = 0;
271 std::vector<std::string> devices;
278 DBG <<
"Media couldn't provide file " << file <<
" , releasing." << endl;
286 MIL <<
"Failed to release media " << media << endl;
314 MIL <<
"Can't provide file. Non-Interactive mode." << endl;
322 user =
report->requestMedia (
333 MIL <<
"ProvideFile exception caught, callback answer: " << user << endl;
337 DBG <<
"Aborting" << endl;
338 AbortRequestException aexcp(
"Aborting requested by user");
339 aexcp.remember(excp);
344 DBG <<
"Skipping" << endl;
345 SkipRequestException nexcp(
"User-requested skipping of a file");
346 nexcp.remember(excp);
351 DBG <<
"Eject: try to release" << endl;
355 media_mgr.
release (media, devindex < devices.size() ? devices[devindex] :
"");
366 DBG <<
"Going to try again" << endl;
368 media_mgr.
close(media);
377 DBG <<
"Don't know, let's ABORT" << endl;
390 ProvideFileOptions options )
433 WAR <<
"Verifier not found" << endl;
443 if (scheme ==
"cd" || scheme ==
"dvd")
446 DBG <<
"Rewriting url " << url_r << endl;
461 url.setQueryParam(
"iso", isofile);
462 DBG <<
"Url rewrite result: " <<
url << endl;
475 url.setPathName(pathname);
476 DBG <<
"Url rewrite result: " <<
url << endl;
485 DBG <<
"Releasing all media IDs held by this MediaSetAccess" << endl;
487 for (MediaMap::const_iterator m =
_medias.begin(); m !=
_medias.end(); ++m)
488 manager.
release(m->second,
"");
void operator()(media::MediaAccessId media, const Pathname &file)
ProvideFileExistenceOperation()
std::string getScheme() const
Returns the scheme name of the URL.
static ManagedFile asManagedFile()
Create a temporary file and convert it to a automatically cleaned up ManagedFile.
void operator()(media::MediaAccessId media, const Pathname &file)
Base class for Exception.
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
@ icase
Do not differentiate case.
Store and operate with byte count.
std::string getQueryParam(const std::string ¶m, EEncoding eflag=zypp::url::E_DECODED) const
Return the value for the specified query parameter.
void operator()(media::MediaAccessId media, const Pathname &file)
Wrapper for const correct access via Smart pointer types.
std::string asUserHistory() const
A single (multiline) string composed of asUserString and historyAsString.
ByteCount expectedFileSize
Easy-to use interface to the ZYPP dependency resolver.
std::list< DirEntry > DirContent
Returned by readdir.
std::string numstring(char n, int w=0)
IMPL_PTR_TYPE(Application)
Regular expression match result.
void operator()(media::MediaAccessId media, const Pathname &file)
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
#define ZYPP_RETHROW(EXCPT)
Drops a logline and rethrows, updating the CodeLocation.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
bool regex_match(const std::string &s, smatch &matches, const regex ®ex)
\relates regex \ingroup ZYPP_STR_REGEX \relates regex \ingroup ZYPP_STR_REGEX
String related utilities and Regular expression matching.
int hardlinkCopy(const Pathname &oldpath, const Pathname &newpath)
Create newpath as hardlink or copy of oldpath.
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
const std::string & asString() const
String representation.