Imported Upstream version 17.23.6 upstream/17.23.6
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 27 Nov 2020 06:49:01 +0000 (15:49 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 27 Nov 2020 06:49:01 +0000 (15:49 +0900)
VERSION.cmake
libzypp.spec.cmake
package/libzypp.changes
tools/zypp-NameReqPrv.cc

index 460c93a..b41d44a 100644 (file)
@@ -61,8 +61,8 @@
 SET(LIBZYPP_MAJOR "17")
 SET(LIBZYPP_COMPATMINOR "22")
 SET(LIBZYPP_MINOR "23")
-SET(LIBZYPP_PATCH "5")
+SET(LIBZYPP_PATCH "6")
 #
-# LAST RELEASED: 17.23.5 (22)
+# LAST RELEASED: 17.23.6 (22)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index 16a47fc..cf444d5 100644 (file)
 %if 0%{?is_opensuse} && (0%{?sle_version} >= 150100 || 0%{?suse_version} > 1500)
 %bcond_without zchunk
 %else
-%if 0%{?sle_version} >= 150200
-%bcond_without zchunk
-%else
 %bcond_with zchunk
 %endif
-%endif
 
 %bcond_without mediabackend_tests
 
index 823f674..66a4727 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Jun  4 11:45:03 CEST 2020 - ma@suse.de
+
+- Revert "Enable zchunk on SLE-15-SP2".
+- version 17.23.6 (22)
+
+-------------------------------------------------------------------
 Wed May 27 18:50:32 CEST 2020 - ma@suse.de
 
 - Enable zchunk on SLE-15-SP2.
index 19aab32..6568cad 100644 (file)
@@ -86,15 +86,19 @@ struct PQSort
 
 struct Table
 {
-  void row( PoolQuery::const_iterator it_r )
+  std::vector<std::string> & row( const sat::Solvable & solv_r )
   {
     //smax( _maxSID,  );
-    smax( _maxNAME, it_r->ident().size() + it_r->edition().size() + it_r->arch().size() );
-    smax( _maxREPO, it_r->repository().name().size(), it_r->repository().name() );
+    smax( _maxNAME, solv_r.ident().size() + solv_r.edition().size() + solv_r.arch().size() );
+    smax( _maxREPO, solv_r.repository().name().size(), solv_r.repository().name() );
     //smax( _maxTIME, );
-    //smax( _maxVEND, it_r->vendor().size() );
+    //smax( _maxVEND, solv_r.vendor().size() );
+    return _map[solv_r];
+  }
 
-    std::vector<std::string> & details { _map[*it_r] };
+  void row( PoolQuery::const_iterator it_r )
+  {
+    std::vector<std::string> & details { row( *it_r ) };
     for_( match, it_r.matchesBegin(), it_r.matchesEnd() ) {
       details.push_back( match->inSolvAttr().asString().substr( 9, 3 )+": " +match->asString() );
     }
@@ -178,6 +182,75 @@ void dDump( const std::string & spec_r )
   message << endl << "}" << endl;
 }
 
+///////////////////////////////////////////////////////////////////
+
+void dTree( const std::string & cmd_r, const std::string & spec_r )
+{
+  message << "tree " << spec_r << " {";
+
+  sat::WhatProvides spec( Capability::guessPackageSpec( spec_r ) );
+  if ( spec.empty() )
+  {
+    message << "}" << endl;
+    return;
+  }
+
+  static const std::list<sat::SolvAttr> attrs {
+    sat::SolvAttr::requires,
+    sat::SolvAttr::recommends,
+    sat::SolvAttr::obsoletes,
+    sat::SolvAttr::conflicts,
+    sat::SolvAttr::supplements,
+  };
+
+  std::map<sat::SolvAttr,std::map<sat::Solvable,std::set<std::string>>> result;        // solvables recommending provided capability
+  {
+    Table t;
+    for ( const auto & el : spec )
+    {
+      auto & details { t.row( el ) };
+      for ( const auto & cap : el.provides() )
+      {
+       //details.push_back( "prv: "+cap.asString() );  // list only matching ones
+
+       // get attrs matching cap
+       for ( const auto & attr : attrs )
+       {
+         PoolQuery q;
+         q.addDependency( attr, cap );
+         if ( q.empty() )
+           continue;
+         for_( it, q.begin(), q.end() ) {
+           for_( match, it.matchesBegin(), it.matchesEnd() ) {
+             result[attr][*it].insert( match->inSolvAttr().asString().substr( 9, 3 )+": " +match->asString()
+             + " (" + cap.asString() + ")"
+             );
+           }
+         }
+       }
+      }
+    }
+    message << endl << t;
+  }
+
+  for ( const auto & attr : attrs )
+  {
+    if ( result[attr].empty() )
+      continue;
+
+    message << endl << "======== " << attr << " by:" << endl;
+    Table t;
+    for ( const auto & el : result[attr] )
+    {
+      auto & details { t.row( el.first ) };
+      for ( const auto & cap : el.second )
+       details.push_back( cap );
+    }
+    message << endl << t << endl;
+  }
+  message << "}" << endl;
+}
+
 /******************************************************************
 **
 **      FUNCTION NAME : main
@@ -317,6 +390,16 @@ int main( int argc, char * argv[] )
            else
              return errexit("-D <pkgspec> requires an argument.");
            break;
+         case 'T':
+           if ( argc > 1 )
+           {
+             std::string cmd { *argv };
+             --argc,++argv;
+             dTree( cmd, *argv );
+           }
+           else
+             return errexit("-T <pkgspec> requires an argument.");
+           break;
          case 'i': ignorecase =        true;   break;
          case 'I': ignorecase =        false;  break;
          case 'x': matechexact =       true;   break;
@@ -427,9 +510,7 @@ int main( int argc, char * argv[] )
        continue;
       t.row( it );
     }
-    message << t << endl;
-
-    message << "}" << endl;
+    message << t << "}" << endl;
   }
 
   INT << "===[END]============================================" << endl << endl;