Author: schubi2 Date: Wed Apr 30 12:10:03 2008 New Revision: 9897 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9897&view=rev Log: - remove _items_to_update - regarding user selected items in the resolve queue Modified: trunk/libzypp/zypp/solver/detail/SATResolver.cc trunk/libzypp/zypp/solver/detail/SATResolver.h Modified: trunk/libzypp/zypp/solver/detail/SATResolver.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/SATResolver.cc?rev=9897&r1=9896&r2=9897&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/SATResolver.cc (original) +++ trunk/libzypp/zypp/solver/detail/SATResolver.cc Wed Apr 30 12:10:03 2008 @@ -195,16 +195,6 @@ } } } - if (!found) { - for (PoolItemList::const_iterator iter = _items_to_update.begin(); - iter != _items_to_update.end(); iter++) { - if (*iter == item) { - _items_to_update.remove(*iter); - found = true; - break; - } - } - } } @@ -649,16 +639,6 @@ queue_push( &(_jobQueue), id ); } - for (PoolItemList::const_iterator iter = _items_to_update.begin(); iter != _items_to_update.end(); iter++) { - Id id = (*iter)->satSolvable().id(); - if (id == ID_NULL) { - ERR << "Update explicit: " << *iter << " not found" << endl; - } - MIL << "Update explicit " << *iter << " with the SAT-Pool ID: " << id << endl; - queue_push( &(_jobQueue), SOLVER_INSTALL_SOLVABLE_UPDATE ); - queue_push( &(_jobQueue), id ); - } - for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter != _items_to_remove.end(); iter++) { sat::detail::IdType ident( (*iter)->satSolvable().ident().id() ); MIL << "Delete " << *iter << " with the string ID: " << ident << endl; @@ -727,7 +707,49 @@ // generate solver queue for (SolverQueueItemList::const_iterator iter = requestQueue.begin(); iter != requestQueue.end(); iter++) { (*iter)->addRule(_jobQueue); + } + + // Add addition item status to the resolve-queue cause these can be set by problem resolutions + for (PoolItemList::const_iterator iter = _items_to_install.begin(); iter != _items_to_install.end(); iter++) { + Id id = (*iter)->satSolvable().id(); + if (id == ID_NULL) { + ERR << "Install: " << *iter << " not found" << endl; + } + MIL << "Install " << *iter << " with the SAT-Pool ID: " << id << endl; + queue_push( &(_jobQueue), SOLVER_INSTALL_SOLVABLE ); + queue_push( &(_jobQueue), id ); + } + for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter != _items_to_remove.end(); iter++) { + sat::detail::IdType ident( (*iter)->satSolvable().ident().id() ); + MIL << "Delete " << *iter << " with the string ID: " << ident << endl; + queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE_NAME ); + queue_push( &(_jobQueue), ident); + } + for (PoolItemList::const_iterator iter = _items_to_lock.begin(); iter != _items_to_lock.end(); iter++) { + sat::detail::SolvableIdType ident( (*iter)->satSolvable().id() ); + if (iter->status().isInstalled()) { + MIL << "Lock installed item " << *iter << " with the string ID: " << ident << endl; + queue_push( &(_jobQueue), SOLVER_INSTALL_SOLVABLE ); + queue_push( &(_jobQueue), ident ); + } else { + MIL << "Lock NOT installed item " << *iter << " with the string ID: " << ident << endl; + queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE ); + queue_push( &(_jobQueue), ident ); + } + } + for (PoolItemList::const_iterator iter = _items_to_keep.begin(); iter != _items_to_keep.end(); iter++) { + sat::detail::SolvableIdType ident( (*iter)->satSolvable().id() ); + if (iter->status().isInstalled()) { + MIL << "Keep installed item " << *iter << " with the string ID: " << ident << endl; + queue_push( &(_jobQueue), SOLVER_INSTALL_SOLVABLE | SOLVER_WEAK); + queue_push( &(_jobQueue), ident ); + } else { + MIL << "Keep NOT installed item " << *iter << " with the string ID: " << ident << endl; + queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE | SOLVER_WEAK); + queue_push( &(_jobQueue), ident ); + } } + // solving bool ret = solving(); Modified: trunk/libzypp/zypp/solver/detail/SATResolver.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/SATResolver.h?rev=9897&r1=9896&r2=9897&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/SATResolver.h (original) +++ trunk/libzypp/zypp/solver/detail/SATResolver.h Wed Apr 30 12:10:03 2008 @@ -67,7 +67,6 @@ // list populated by calls to addPoolItemTo*() PoolItemList _items_to_install; - PoolItemList _items_to_update; PoolItemList _items_to_remove; PoolItemList _items_to_lock; PoolItemList _items_to_keep; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org