, _verifying (false)
, _establishing (false)
, _invalid (false)
+ , _askUser(false)
, _architecture(arch)
, _forceResolve(false)
, _upgradeMode(false)
if (!found) {
// generating a default problem
ResolverInfo_Ptr misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_REJECT_INSTALL, item, RESOLVER_INFO_PRIORITY_VERBOSE);
- addError (misc_info);
+ addError (misc_info, true); // true = asking the user
} else {
// Put the info at the end of the list, flagged as error
for (ResolverInfoList::const_iterator iter = addList.begin(); iter != addList.end(); iter++) {
ResolverInfo_Ptr info = *iter;
- addError (info);
+ addError (info, true); // true = asking the user
}
}
- return false;
+// return false;
}
if (status.isToBeUninstalled()
// info
void
-ResolverContext::addInfo (ResolverInfo_Ptr info)
+ResolverContext::addInfo (ResolverInfo_Ptr info, bool askUser)
{
_XDEBUG( "ResolverContext[" << this << "]::addInfo(" << *info << ")" );
_log.push_back (info);
// _propagated_importance = false;
- if (info->error ()) {
+ if (info->error ()
+ && !askUser) { // Go forward in order to evaluate more problems
if (! _invalid) {
ResolverInfo_Ptr info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_INVALID_SOLUTION, PoolItem_Ref(), RESOLVER_INFO_PRIORITY_VERBOSE);
_invalid = true;
}
+ if (askUser)
+ _askUser = true;
}
void
-ResolverContext::addError (ResolverInfo_Ptr info)
+ResolverContext::addError (ResolverInfo_Ptr info, bool askUser)
{
info->flagAsError ();
WAR << "******** Error: " << *info << endl;
- addInfo (info);
+ addInfo (info, askUser);
}
bool _verifying; // running 'verifySystem'
bool _establishing; // running 'establishSystem'
bool _invalid; // lead to invalid solution
+ bool _askUser; // lead to invalid solution too cause we have to ask the user
PoolItem_Ref _last_checked_item; // cache for {get,set}Status
ResStatus _last_checked_status;
int otherPenalties (void) const { return _other_penalties; }
bool isValid (void) const { return !_invalid; }
+ bool askUser (void) const { return _askUser; }
bool isInvalid (void) const { return _invalid; }
bool verifying (void) const { return _verifying; }
// int impossibleCount (void);
// add to the report log
- void addInfo (ResolverInfo_Ptr info); // normal progress info
- void addError (ResolverInfo_Ptr info); // error progress info
-
+ void addInfo (ResolverInfo_Ptr info, bool askUser = false); // normal progress info
+ void addError (ResolverInfo_Ptr info, bool askUser = false);// error progress info
+
// iterate over report log
void foreachInfo (PoolItem_Ref item, int priority, ResolverInfoFn fn, void *data) const;
ResolverInfoList getInfo (void) const;
bool
ResolverQueue::isInvalid ()
{
- return _context->isInvalid();
+ return _context->isInvalid() || _context->askUser();
}