12 using std::stringstream;
34 Url serviceUrl( service.
url() );
40 mediamanager.
attach( mid );
41 mediamanager.
provideFile( mid,
"repo/repoindex.xml" );
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;
void setProbedTtl(Date::Duration ttl_r) const
Lazy init sugested TTL.
function< bool(const RepoInfo &)> ProcessRepo
Return false from the callback to get a AbortRequestException to be thrown and the processing to be c...
Retrieval of repository list for a service.
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
Reads through a repoindex.xml file and collects repositories.
std::string asString(const DefaultIntegral< Tp, TInitial > &obj)
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
ExternalProgram extended to offer reading programs stderr.
PluginServiceRepos(const Pathname &root_r, const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
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...
std::vector< std::string > Arguments
Interface of repoindex.xml file reader.
void remember(const Exception &old_r)
Store an other Exception as history.
Service type enumeration.
Read repository data from a .repo file.
Url url() const
The service url.
bool stderrGetUpTo(std::string &retval_r, const char delim_r, bool returnDelim_r=false)
Read data up to delim_r from stderr (nonblocking).
RIMServiceRepos(const Pathname &, const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
int close()
Wait for the progamm to complete.
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
Base class for Exception.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
Date::Duration ttl() const
Metadata TTL (repoindex.xml:xpath:/repoindex or 0).
Easy-to use interface to the ZYPP dependency resolver.
static Pathname stripprefix(const Pathname &root_r, const Pathname &path_r)
Return path_r with any root_r dir prefix striped.
const std::string & msg() const
Return the message string provided to the ctor.