bool isUninstall (void) const { return _type == QUEUE_ITEM_TYPE_UNINSTALL; }
bool isEstablish (void) const { return _type == QUEUE_ITEM_TYPE_ESTABLISH; }
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil) = 0;
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil) = 0;
virtual QueueItem_Ptr copy (void) const = 0;
virtual int cmp (QueueItem_constPtr item) const = 0;
int compare (QueueItem_constPtr item) const { return CMP(_type, item->_type); }
//---------------------------------------------------------------------------
bool
-QueueItemBranch::process (ResolverContext_Ptr context, QueueItemList & qil)
+QueueItemBranch::process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil)
{
_XDEBUG("QueueItemBranch::process(" << *this << ")");
/* If we just have one possible item, process it. */
QueueItem_Ptr item = live_branches.front();
- did_something = item->process (context, qil);
+ did_something = item->process (mainQueue, context, qil);
/* Set the item pointer to NULL inside of our original branch
item, since our call to rc_queue_item_process is now
// ---------------------------------- methods
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
virtual QueueItem_Ptr copy (void) const;
virtual int cmp (QueueItem_constPtr item) const;
virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
bool
-QueueItemConflict::process (ResolverContext_Ptr context, QueueItemList & new_items)
+QueueItemConflict::process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & new_items)
{
_XDEBUG("QueueItemConflict::process(" << *this << ")");
// ---------------------------------- methods
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
virtual QueueItem_Ptr copy (void) const;
virtual int cmp (QueueItem_constPtr item) const;
virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
#include "zypp/solver/detail/QueueItemInstall.h"
#include "zypp/solver/detail/QueueItemRequire.h"
#include "zypp/solver/detail/QueueItemConflict.h"
+#include "zypp/solver/detail/QueueItemUninstall.h"
#include "zypp/solver/detail/QueueItem.h"
#include "zypp/solver/detail/Helper.h"
#include "zypp/solver/detail/ResolverContext.h"
bool
-QueueItemEstablish::process (ResolverContext_Ptr context, QueueItemList & qil)
+QueueItemEstablish::process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil)
{
_XDEBUG("QueueItemEstablish::process(" << *this << ")");
{
_XDEBUG("Atom/Patch/Installed/Establishing " << _item << " has unfulfilled requirement " << *iter << " -> incomplete");
context->incomplete( _item, _other_penalty );
+
+ // if something installed goes 'incomplete' outside of the establishing call, its always an error
+ if ( status.staysInstalled()
+ &&!context->establishing()) {
+
+ // last check if the item will be deleted.
+ // (check the queue, if there is a delete request)
+ QueueItemList::const_iterator iterQueue;
+ for (iterQueue = mainQueue.begin(); iterQueue != mainQueue.end(); iterQueue++) {
+ QueueItem_Ptr qitem = *iterQueue;
+ if (qitem->isUninstall()) {
+ QueueItemUninstall_Ptr uninstall = dynamic_pointer_cast<QueueItemUninstall>(qitem);
+ if (uninstall->deletedItem() == _item) {
+ _DEBUG(_item << " will be uninstalled later. So, we do not have to inform the user.");
+ break;
+ }
+ }
+ }
+
+ if (iterQueue == mainQueue.end()) {
+ ResolverInfo_Ptr misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_INCOMPLETES, _item, RESOLVER_INFO_PRIORITY_VERBOSE);
+ context->addError (misc_info);
+ }
+ }
}
else {
_XDEBUG("Transacted " << _item << " has unfulfilled requirement " << *iter << " -> leave");
// ---------------------------------- methods
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
virtual QueueItem_Ptr copy (void) const;
virtual int cmp (QueueItem_constPtr item) const;
//---------------------------------------------------------------------------
bool
-QueueItemGroup::process (ResolverContext_Ptr context, QueueItemList & new_items)
+QueueItemGroup::process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & new_items)
{
_DEBUG( "QueueItemGroup::process" );
// ---------------------------------- methods
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
virtual QueueItem_Ptr copy (void) const;
virtual int cmp (QueueItem_constPtr item) const;
virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
//---------------------------------------------------------------------------------------
bool
-QueueItemInstall::process (ResolverContext_Ptr context, QueueItemList & qil)
+QueueItemInstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil)
{
ResStatus status = context->getStatus(_item);
// ---------------------------------- methods
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
virtual QueueItem_Ptr copy (void) const;
virtual int cmp (QueueItem_constPtr item) const;
//----------------------------------------------------------------------------
bool
-QueueItemRequire::process (ResolverContext_Ptr context, QueueItemList & new_items)
+QueueItemRequire::process (const QueueItemList & mainQueue,
+ ResolverContext_Ptr context, QueueItemList & new_items)
{
_XDEBUG("QueueItemRequire::process(" << *this << ")");
// ---------------------------------- methods
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
virtual QueueItem_Ptr copy (void) const;
virtual int cmp (QueueItem_constPtr item) const;
virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
bool
-QueueItemUninstall::process (ResolverContext_Ptr context, QueueItemList & qil)
+QueueItemUninstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil)
{
ResStatus status = context->getStatus(_item);
void setDueToObsolete (const PoolItem_Ref item)
{ _due_to_obsolete = true; _obsoletes_item = item; }
void setUnlink (void);
+ PoolItem_Ref deletedItem(void) const { return _item; }
// ---------------------------------- methods
- virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
+ virtual bool process (const QueueItemList & mainQueue, ResolverContext_Ptr context, QueueItemList & qil);
virtual QueueItem_Ptr copy (void) const;
virtual int cmp (QueueItem_constPtr item) const;
virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
else {
setStatus (item, ResStatus::needed);
}
-
- return true;
- }
-
- // if something installed goes 'incomplete' outside of the establishing call, its always an error
-
- if (status.staysInstalled()) {
- ResolverInfo_Ptr misc_info = new ResolverInfoMisc (RESOLVER_INFO_TYPE_INCOMPLETES, item, RESOLVER_INFO_PRIORITY_VERBOSE);
- addError (misc_info);
- return false;
}
return true;
_XDEBUG( "=====> 1st pass: [" << *qitem << "]");
QueueItemList::iterator next = iter; ++next;
if (qitem && qitem->priority() == max_priority) {
- if (qitem->process (_context, new_qitems)) {
+ if (qitem->process (_qitems, _context, new_qitems)) {
did_something_recently = true;
}
_qitems.erase (iter);