SET(LIBZYPP_MAJOR "15")
SET(LIBZYPP_COMPATMINOR "19")
SET(LIBZYPP_MINOR "22")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_PATCH "2")
#
-# LAST RELEASED: 15.22.1 (19)
+# LAST RELEASED: 15.22.2 (19)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
+-------------------------------------------------------------------
+Tue Jun 21 11:06:56 CEST 2016 - ma@suse.de
+
+- Filter duplicate resolver solutions (bsc#985674)
+- version 15.22.2 (19)
+
-------------------------------------------------------------------
Wed Jun 15 12:41:17 CEST 2016 - ma@suse.de
{
IMPL_PTR_TYPE(ResolverProblem);
+ /////////////////////////////////////////////////////////////////////////
+ namespace
+ {
+ // HACK for bsc#985674: filter duplicate solutions
+ //
+ inline bool solutionInList( const ProblemSolutionList & solutions_r, const ProblemSolution_Ptr & solution_r )
+ {
+ for ( const ProblemSolution_Ptr & solution : solutions_r )
+ {
+ if ( solution->description() == solution_r->description()
+ && solution->details() == solution_r->details()
+ && solution->actions().size() == solution_r->actions().size() )
+ return true;
+ }
+ return false;
+ }
+ } // namespace
+ /////////////////////////////////////////////////////////////////////////
+
///////////////////////////////////////////////////////////////////
/// \class ResolverProblem::Impl
/// \brief ResolverProblem implementation.
void ResolverProblem::addSolution( ProblemSolution_Ptr solution, bool inFront )
{
- if (inFront)
- { _pimpl->_solutions.push_front( solution ); }
- else
- { _pimpl->_solutions.push_back( solution ); }
+ if ( ! solutionInList( _pimpl->_solutions, solution ) ) // bsc#985674: filter duplicate solutions
+ {
+ if (inFront)
+ { _pimpl->_solutions.push_front( solution ); }
+ else
+ { _pimpl->_solutions.push_back( solution ); }
+ }
}