45 SystemCheck::SystemCheck() {
47 _file = ZConfig::instance().solver_checkSystemFile();
52 bool SystemCheck::setFile(
const Pathname & file)
const{
53 MIL <<
"Setting checkFile to : " << file << endl;
59 const Pathname & SystemCheck::file() {
71 bool SystemCheck::loadFile()
const{
72 Target_Ptr trg( getZYpp()->getTarget() );
77 if ( ! pi.isFile() ) {
78 WAR <<
"Can't read " <<
_file <<
" " << pi << endl;
85 std::ifstream infile(
_file.c_str() );
88 if ( ! l.empty() && l[0] !=
'#' )
92 if (capList.size() == 2 ) {
93 CapList::iterator it = capList.begin();
94 if (*it ==
"requires") {
96 }
else if (*it ==
"conflicts") {
99 ERR <<
"Wrong parameter: " << l << endl;
102 ERR <<
"Wrong line: " << l << endl;
106 MIL <<
"Read " << pi << endl;
118 str <<
_file << endl;
119 str <<
"requires" << endl;
120 for (CapabilitySet::const_iterator it =
_require.begin(); it !=
_require.end(); ++it)
121 str <<
" " << *it << endl;
123 str <<
"conflicts" << endl;
124 for (CapabilitySet::const_iterator it =
_conflict.begin(); it !=
_conflict.end(); ++it)
125 str <<
" " << *it << endl;
bool next()
Advance to next line.
unsigned split(const C_Str &line_r, _OutputIterator result_r, const C_Str &sepchars_r=" \t")
Split line_r into words.
Simple lineparser: Traverse each line in a file.
std::tr1::unordered_set< Capability > CapabilitySet
std::string trim(const std::string &s, const Trim trim_r)
std::ostream & operator<<(std::ostream &str, const ::_Dataiterator *obj)
Save and restore locale set from file.