X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcondition.cpp;h=4c7b5ed5b2d923a8b308c975e470dbfdf75041b3;hb=20994a6f4802f2dbcf01888d0e1996edf554ade5;hp=314d9c93688c592f80d9c07452cedb2c31be8cb7;hpb=04c316da6d5d90e43cba262f54d90ca231f703bf;p=builder.git diff --git a/source/condition.cpp b/source/condition.cpp index 314d9c9..4c7b5ed 100644 --- a/source/condition.cpp +++ b/source/condition.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of builder -Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions +Copyright © 2007-2010 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -44,14 +44,15 @@ bool Condition::eval() unsigned start = 1; if(i->second[1]=='=') ++start; + string value = i->second.substr(start); - string value; + bool match = false; if(conf.is_option(i->first)) - value = conf.get_option(i->first).value; + match = (conf.get_option(i->first).value==value); else if(i->first=="arch") - value = pkg.get_builder().get_current_arch().get_name(); + match = pkg.get_builder().get_current_arch().match_name(value); - if((value==i->second.substr(start))==neg) + if(match==neg) result = false; }