string::size_type token = i->find_first_of("=!");
if(token==string::npos)
- expression.insert(StringMap::value_type(*i, "!0"));
+ expression.insert(StringMap::value_type(*i, "="));
else if(token==0 && (*i)[0]=='!')
- expression.insert(StringMap::value_type(*i, "=0"));
+ expression.insert(StringMap::value_type(*i, "!"));
else
expression.insert(StringMap::value_type(i->substr(0, token), i->substr(token)));
}
bool match = false;
if(conf.is_option(i->first))
- match = (conf.get_option(i->first).value==value);
+ {
+ if(value.empty())
+ match = lexical_cast<bool>(conf.get_option(i->first).value);
+ else
+ match = (conf.get_option(i->first).value==value);
+ }
else if(i->first=="arch")
match = pkg.get_builder().get_current_arch().match_name(value);