Imported Upstream version 15.22.2 02/94702/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:09:42 +0000 (11:09 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:09:43 +0000 (11:09 +0900)
Change-Id: Iff04a1a43994c9935f3de5a27dd5d6edc525ba36
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp.changes
zypp/ResolverProblem.cc

index 48365b0a1016bdf9a8978f2bc0df81266c2b3241..a48a02e5b714cc8cc3505424e4903421e2538581 100644 (file)
@@ -61,8 +61,8 @@
 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)
 #=======
index b5b0b0bf32b194afd1c95416a29ce1bf99f2aa3f..9c987313f3a47757a6d89c762323aae5c2a0f316 100644 (file)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+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
 
index 3fe1b9b61ce5f25da7595e404559c55741c9757e..980c77e7a81773fdcbbf91e42bfcb5e89270c14a 100644 (file)
@@ -33,6 +33,25 @@ namespace zypp
 {
   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.
@@ -97,10 +116,13 @@ namespace zypp
 
   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 ); }
+    }
   }