Imported Upstream version 14.32.0 19/94619/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 01:31:09 +0000 (10:31 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 01:31:10 +0000 (10:31 +0900)
Change-Id: I4f2dd156f39cdaf05d4fce69ba361cf5176419cd
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp.changes
zypp/KeyRing.cc
zypp/RepoInfo.cc
zypp/RepoInfo.h
zypp/ResObject.cc

index 56c4275..1f64667 100644 (file)
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "14")
 SET(LIBZYPP_COMPATMINOR "30")
-SET(LIBZYPP_MINOR "31")
+SET(LIBZYPP_MINOR "32")
 SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 14.31.0 (30)
+# LAST RELEASED: 14.32.0 (30)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index db8d2b9..da68ed4 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Dec 10 16:06:04 CET 2014 - ma@suse.de
+
+- suppress informal license (no need to accept) upon update (bnc#908976)
+- version 14.32.0 (30)
+
+-------------------------------------------------------------------
 Mon Dec  8 14:53:00 CET 2014 - ma@suse.de
 
 - Adapt to gpg-2.1 (bnc#908135)
index 9ff1f80..13cae3d 100644 (file)
@@ -105,7 +105,6 @@ namespace zypp
 
        void assertCache( const Pathname & keyring_r )
        {
-           ExternalProgram("ls -l "+keyring_r.asString()) >> SEC;
          // .kbx since gpg2-2.1
          if ( !_keyringK )
            _keyringK.reset( new WatchFile( keyring_r/"pubring.kbx", WatchFile::NO_INIT ) );
index fa5626a..e78caba 100644 (file)
@@ -356,6 +356,9 @@ namespace zypp
   }
 
   std::string RepoInfo::getLicense( const Locale & lang_r )
+  { return const_cast<const RepoInfo *>(this)->getLicense( lang_r );  }
+
+  std::string RepoInfo::getLicense( const Locale & lang_r ) const
   {
     LocaleSet avlocales( getLicenseLocales() );
     if ( avlocales.empty() )
index d540b9a..0085e91 100644 (file)
@@ -348,7 +348,8 @@ namespace zypp
       bool needToAcceptLicense() const;
 
       /** Return the best license for the current (or a specified) locale. */
-      std::string getLicense( const Locale & lang_r = Locale() );
+      std::string getLicense( const Locale & lang_r = Locale() ) const;
+      std::string getLicense( const Locale & lang_r = Locale() ); // LEGACY API
 
       /** Return the locales the license is available for.
        * \ref Locale::noCode is included in case of \c license.txt which does
index 09e3449..5407b3a 100644 (file)
@@ -17,6 +17,8 @@
 #include "zypp/RepoInfo.h"
 #include "zypp/IdString.h"
 
+#include "zypp/ui/Selectable.h"
+
 using namespace zypp;
 using namespace std;
 
@@ -71,7 +73,11 @@ namespace zypp
   {
     std::string ret = lookupStrAttribute( sat::SolvAttr::eula, lang_r );
     if ( ret.empty() && isKind<Product>() )
-      return repoInfo().getLicense( lang_r );
+    {
+      const RepoInfo & ri( repoInfo() );
+      if ( ri.needToAcceptLicense() || ! ui::Selectable::get( *this )->hasInstalledObj() )
+       ret = ri.getLicense( lang_r ); // bnc#908976: suppress informal license upon update
+    }
     return ret;
   }