16#define ZYPP_USE_RESOLVER_INTERNALS
48 SystemCheck::SystemCheck() {
59 bool SystemCheck::setFile(
const Pathname & file)
const{
60 MIL <<
"Setting checkFile to : " << file << endl;
66 bool SystemCheck::setDir(
const Pathname & dir)
const {
67 MIL <<
"Setting checkFile directory to : " << dir << endl;
74 const Pathname & SystemCheck::file() {
78 const Pathname & SystemCheck::dir() {
90 bool SystemCheck::loadFile(Pathname & file,
bool reset_caps)
const{
93 file =
trg->assertRootPrefix( file );
96 if ( !
pi.isFile() ) {
97 WAR <<
"Can't read " << file <<
" " <<
pi << endl;
106 std::ifstream
infile( file.c_str() );
109 if ( !
l.empty() &&
l[0] !=
'#' )
115 if (*
it ==
"requires") {
117 }
else if (*
it ==
"conflicts") {
120 ERR <<
"Wrong parameter: " <<
l << endl;
123 ERR <<
"Wrong line: " <<
l << endl;
127 MIL <<
"Read " <<
pi << endl;
131 bool SystemCheck::loadFiles()
const {
134 [
this](
const Pathname &
dir_r,
const char *
const &
name_r)->
bool
136 const std::string
wanted =
".check";
139 MIL <<
"Skipping " << pth <<
" (not a *.check file)" << endl;
143 MIL <<
"Reading " << pth << endl;
144 return loadFile(pth, false );
159 str <<
"requires" << endl;
161 str <<
" " << *
it << endl;
163 str <<
"conflicts" << endl;
165 str <<
" " << *
it << endl;
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
AutoDispose()
Default Ctor using default constructed value and no dispose function.
static ZConfig & instance()
Singleton ctor.
bool empty() const
Test for an empty path.
String related utilities and Regular expression matching.
int dirForEach(const Pathname &dir_r, const StrMatcher &matcher_r, function< bool(const Pathname &, const char *const)> fnc_r)
unsigned split(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", const Trim trim_r=NO_TRIM)
Split line_r into words.
std::string trim(const std::string &s, const Trim trim_r)
Easy-to use interface to the ZYPP dependency resolver.
std::vector< std::string > CapList
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
std::unordered_set< Capability > CapabilitySet