3#include <zypp/base/Logger.h>
6#include <zypp-media/MediaException>
10#include <zypp/ExternalProgram.h>
12using std::stringstream;
34 Url serviceUrl( service.
url() );
40 mediamanager.
attach( mid );
47 mediamanager.
close( mid );
75 args.push_back(
"/bin/sh" );
76 args.push_back(
"-c" );
81 if ( prog.
close() != 0 )
85 std::string errbuffer;
87 ERR <<
"Capture plugin error:[" << endl << errbuffer << endl <<
']' << endl;
Interface of repoindex.xml file reader.
Base class for Exception.
const std::string & msg() const
Return the message string provided to the ctor.
void remember(const Exception &old_r)
Store an other Exception as history.
ExternalProgram extended to offer reading programs stderr.
bool stderrGetUpTo(std::string &retval_r, const char delim_r, bool returnDelim_r=false)
Read data up to delim_r from stderr (nonblocking).
std::vector< std::string > Arguments
int close()
Wait for the progamm to complete.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
void setProbedTtl(Date::Duration ttl_r) const
Lazy init sugested TTL.
Url url() const
The service url.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
static Pathname stripprefix(const Pathname &root_r, const Pathname &path_r)
Return path_r with any root_r dir prefix striped.
const std::string & asString() const
String representation.
Read repository data from a .repo file.
Reads through a repoindex.xml file and collects repositories.
Date::Duration ttl() const
Metadata TTL (repoindex.xml:xpath:/repoindex@ttl or 0).
Retrieval of repository list for a service.
function< bool(const RepoInfo &)> ProcessRepo
Return false from the callback to get a AbortRequestException to be thrown and the processing to be c...
ServiceRepos(const Pathname &root_r, const ServiceInfo &service, const ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
bsc#1080693: Explicitly pass the RemoManagers rootDir until it can be queried from the ServiceInfo.
Easy-to use interface to the ZYPP dependency resolver.
PluginServiceRepos(const Pathname &root_r, const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
RIMServiceRepos(const Pathname &, const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Service type enumeration.
#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.