if (s.alias() != source.alias()) {
return true;
}
- poolItem = p;
- return false; // stop here, we found it
+ if (!p->arch().compatibleWith( God->architecture() )) {
+ return true;
+ }
+
+ if (!poolItem // none yet
+ || (poolItem->arch().compare( p->arch() ) < 0) // new has better arch
+ || (poolItem->edition().compare( p->edition() ) < 0)) // new has better edition
+ {
+ poolItem = p;
+ }
+ return true;
}
};
invokeOnEach( God->pool().byNameBegin( package_name ),
God->pool().byNameEnd( package_name ),
functor::chain( resfilter::BySource(source), resfilter::ByKind (kind) ),
-// resfilter::ByKind (kind),
functor::functorRef<bool,PoolItem> (info) );
poolItem = info.poolItem;
} else if (node->equals ("system")) {
string file = node->getProp ("file");
- if (load_source ("@system", file, "helix", true) < 0) {
+ if (load_source ("@system", file, "helix", true) <= 0) {
cerr << "Can't setup 'system'" << endl;
exit( 1 );
}