X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcondition.cpp;h=5cce44462d3e984b9f61e85f2152e9c994a70d07;hb=0f5283a54fd188072eca23fbd980a43c6c869913;hp=4b45dca51f2eeaf06a13880d2c214b3fe557d594;hpb=b50019441dd16d4aaba1eeffc381ded3e4a4be2d;p=builder.git diff --git a/source/condition.cpp b/source/condition.cpp index 4b45dca..5cce444 100644 --- a/source/condition.cpp +++ b/source/condition.cpp @@ -6,6 +6,7 @@ Distributed under the LGPL */ #include +#include "builder.h" #include "condition.h" #include "sourcepackage.h" @@ -44,7 +45,13 @@ bool Condition::eval() if(i->second[1]=='=') ++start; - if((conf.get_option(i->first).value==i->second.substr(start))==neg) + string value; + if(conf.is_option(i->first)) + value=conf.get_option(i->first).value; + else if(i->first=="arch") + value=pkg.get_builder().get_current_arch().get_name(); + + if((value==i->second.substr(start))==neg) result=false; }