Imported Upstream version 14.42.2 43/94643/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 01:35:51 +0000 (10:35 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 01:35:52 +0000 (10:35 +0900)
Change-Id: I78fc226012c6cd68fc6c5b667a908d4984da3444
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp.changes
po/zypp-po.tar.bz2
zypp/RepoInfo.cc
zypp/RepoInfo.h
zypp/RepoManager.cc
zypp/TriBool.h

index 7d4b596..8304346 100644 (file)
@@ -61,8 +61,8 @@
 SET(LIBZYPP_MAJOR "14")
 SET(LIBZYPP_COMPATMINOR "39")
 SET(LIBZYPP_MINOR "42")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_PATCH "2")
 #
-# LAST RELEASED: 14.42.1 (39)
+# LAST RELEASED: 14.42.2 (39)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index cecccd1..8ad414f 100644 (file)
@@ -1,4 +1,15 @@
 -------------------------------------------------------------------
+Thu Oct 22 10:27:41 CEST 2015 - ma@suse.de
+
+- fix Plugin-services not updating repo GPGCheck settings (bnc#951402)
+- version 14.42.2 (39)
+
+-------------------------------------------------------------------
+Sun Oct 18 01:14:29 CEST 2015 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
 Thu Oct 15 10:44:14 CEST 2015 - ma@suse.de
 
 - make Solvable::asUserString more readable (bnc#949957)
index 692cffb..ee23cae 100644 (file)
Binary files a/po/zypp-po.tar.bz2 and b/po/zypp-po.tar.bz2 differ
index be093b3..353bd49 100644 (file)
@@ -292,6 +292,12 @@ namespace zypp
   void RepoInfo::setPkgGpgCheck( TriBool value_r )
   { _pimpl->_pkgGpgCheck = value_r; }
 
+  void RepoInfo::getRawGpgChecks( TriBool & g_r, TriBool & r_r, TriBool & p_r ) const
+  {
+    g_r = _pimpl->_gpgCheck;
+    r_r = _pimpl->_repoGpgCheck;
+    p_r = _pimpl->_pkgGpgCheck;
+  }
 
   TriBool RepoInfo::validRepoSignature() const
   {
index 0803835..3fc3e1e 100644 (file)
@@ -421,6 +421,10 @@ namespace zypp
 
       class Impl;
     private:
+      friend class RepoManager;
+      /** Raw values for RepoManager */
+      void getRawGpgChecks( TriBool & g_r, TriBool & r_r, TriBool & p_r ) const;
+
       /** Pointer to implementation */
       RWCOW_pointer<Impl> _pimpl;
   };
index 80f0130..6b5480a 100644 (file)
@@ -2205,6 +2205,27 @@ namespace zypp
           oldRepoModified = true;
         }
 
+        // changed gpg check settings?
+       // ATM only plugin services can set GPG values.
+       if ( service.type() == ServiceType::PLUGIN )
+       {
+         TriBool ogpg[3];      // Gpg RepoGpg PkgGpg
+         TriBool ngpg[3];
+         oldRepo->getRawGpgChecks( ogpg[0], ogpg[1], ogpg[2] );
+         it->     getRawGpgChecks( ngpg[0], ngpg[1], ngpg[2] );
+#define Z_CHKGPG(I,N)                                                                          \
+         if ( ! sameTriboolState( ogpg[I], ngpg[I] ) )                                         \
+         {                                                                                     \
+           DBG << "Service repo " << it->alias() << " gets new "#N"Check " << ngpg[I] << endl; \
+           oldRepo->set##N##Check( ngpg[I] );                                                  \
+           oldRepoModified = true;                                                             \
+         }
+         Z_CHKGPG( 0, Gpg );
+         Z_CHKGPG( 1, RepoGpg );
+         Z_CHKGPG( 2, PkgGpg );
+#undef Z_CHKGPG
+       }
+
         // save if modified:
         if ( oldRepoModified )
         {
index 4f6a0ae..aa5e7ff 100644 (file)
@@ -65,6 +65,10 @@ namespace boost
       /** \relates TriBool stream output */
       inline std::ostream & operator<<(std::ostream & s, const tribool & obj)
       { return s << zypp::asString( obj ); }
+
+      /** \relates TriBool whether 2 tribool have the same state (this is NOT ==) */
+      inline bool sameTriboolState( tribool lhs, tribool rhs )
+      { return( ( indeterminate(lhs) && indeterminate(rhs) ) || ( lhs == rhs ) ); }
     }
 }
 #endif // ZYPP_TRIBOOL_H