33 static bool val = [](){
34 const char *
env =
getenv(
"ZYPP_METALINK_DEBUG");
57#define c2h(c) (((c)>='0' && (c)<='9') ? ((c)-'0') \
58 : ((c)>='a' && (c)<='f') ? ((c)-('a'-10)) \
59 : ((c)>='A' && (c)<='F') ? ((c)-('A'-10)) \
81 std::ifstream
is(filename.
c_str());
84 is.exceptions(std::ifstream::eofbit | std::ifstream::failbit | std::ifstream::badbit);
101 unsigned char sha1[20];
132 unsigned char rp[16];
136 }
catch (
const std::exception &
e ) {
152 }
catch (
const std::exception &
e ) {
179 MIL <<
"Parsed " <<
urls.size() <<
" mirrors from " << filename << std::endl;
181 for (
const auto &url :
urls )
182 DBG <<
"- " << url << std::endl;
189 std::vector<Url>
ret;
191 for (
i = 0;
i <
urls.size();
i++)
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Base class for Exception.
const char * c_str() const
String representation.
String related utilities and Regular expression matching.
Namespace intended to collect all environment variables we use.
bool ZYPP_METALINK_DEBUG()
Hack to circumvent the currently poor –root support.
bool strToBool(const C_Str &str, bool default_r)
Parse str into a bool depending on the default value.
Easy-to use interface to the ZYPP dependency resolver.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.