Hello community,

here is the log from the commit of package yast2-pkg-bindings for 
openSUSE:Factory checked in at 2017-09-22 21:29:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-pkg-bindings"

Fri Sep 22 21:29:25 2017 rev:191 rq:528239 version:4.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes    
2017-06-28 10:33:39.949621716 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new/yast2-pkg-bindings.changes   
    2017-09-22 21:29:32.469586729 +0200
@@ -1,0 +2,31 @@
+Fri Sep 22 07:24:54 UTC 2017 - [email protected]
+
+- Keep enabled recommended packages for the next solver runs
+  when doing distribution upgrade (bsc#1059065)
+- 4.0.0
+
+-------------------------------------------------------------------
+Wed Aug 23 14:24:20 UTC 2017 - [email protected]
+
+- Rename PrdMarkLicenseUnconfirmed to PrdMarkLicenseNotConfirmed
+  (FATE#322276)
+- 3.3.2
+
+-------------------------------------------------------------------
+Mon Aug 21 07:35:43 UTC 2017 - [email protected]
+
+- Add a Pkg.PrdHasLicenseConfirmed and
+  Pkg.PrdMarkLicenseUnconfirmed (FATE#322276)
+- Pkg.PrdGetLicenseToConfirm always returns the license, no matter
+  whether is confirmed or not
+- Add a second argument to Pkg.PrdGetLicenseToConfirm in order
+  get the license translated to the given language
+- 3.3.1
+
+-------------------------------------------------------------------
+Wed Aug 16 11:20:16 UTC 2017 - [email protected]
+
+- Add functions to handle product licenses (FATE#322276)
+- 3.3.0
+
+-------------------------------------------------------------------

Old:
----
  yast2-pkg-bindings-3.2.4.tar.bz2

New:
----
  yast2-pkg-bindings-4.0.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.m6MkF2/_old  2017-09-22 21:29:34.129353089 +0200
+++ /var/tmp/diff_new_pack.m6MkF2/_new  2017-09-22 21:29:34.133352526 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings-devel-doc
-Version:        3.2.4
+Version:        4.0.0
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-pkg-bindings-%{version}.tar.bz2

++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.m6MkF2/_old  2017-09-22 21:29:34.157349148 +0200
+++ /var/tmp/diff_new_pack.m6MkF2/_new  2017-09-22 21:29:34.161348585 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings
-Version:        3.2.4
+Version:        4.0.0
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-pkg-bindings-3.2.4.tar.bz2 -> yast2-pkg-bindings-4.0.0.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings-devel-doc.spec 
new/yast2-pkg-bindings-4.0.0/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings-devel-doc.spec      
2017-06-21 17:32:25.057598963 +0200
+++ new/yast2-pkg-bindings-4.0.0/package/yast2-pkg-bindings-devel-doc.spec      
2017-09-22 10:44:23.624011068 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-pkg-bindings-devel-doc
-Version:        3.2.4
+Version:        4.0.0
 Release:        0
 License:        GPL-2.0
 Group:          Documentation/HTML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.changes 
new/yast2-pkg-bindings-4.0.0/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.changes     
2017-06-21 17:32:25.061598963 +0200
+++ new/yast2-pkg-bindings-4.0.0/package/yast2-pkg-bindings.changes     
2017-09-22 10:44:23.624011068 +0200
@@ -1,4 +1,35 @@
 -------------------------------------------------------------------
+Fri Sep 22 07:24:54 UTC 2017 - [email protected]
+
+- Keep enabled recommended packages for the next solver runs
+  when doing distribution upgrade (bsc#1059065)
+- 4.0.0
+
+-------------------------------------------------------------------
+Wed Aug 23 14:24:20 UTC 2017 - [email protected]
+
+- Rename PrdMarkLicenseUnconfirmed to PrdMarkLicenseNotConfirmed
+  (FATE#322276)
+- 3.3.2
+
+-------------------------------------------------------------------
+Mon Aug 21 07:35:43 UTC 2017 - [email protected]
+
+- Add a Pkg.PrdHasLicenseConfirmed and
+  Pkg.PrdMarkLicenseUnconfirmed (FATE#322276)
+- Pkg.PrdGetLicenseToConfirm always returns the license, no matter
+  whether is confirmed or not
+- Add a second argument to Pkg.PrdGetLicenseToConfirm in order
+  get the license translated to the given language
+- 3.3.1
+
+-------------------------------------------------------------------
+Wed Aug 16 11:20:16 UTC 2017 - [email protected]
+
+- Add functions to handle product licenses (FATE#322276)
+- 3.3.0
+
+-------------------------------------------------------------------
 Wed Jun 21 12:16:39 UTC 2017 - [email protected]
 
 - Do not crash when the repository URL is not defined (bsc#1043218)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.spec 
new/yast2-pkg-bindings-4.0.0/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-3.2.4/package/yast2-pkg-bindings.spec        
2017-06-21 17:32:25.061598963 +0200
+++ new/yast2-pkg-bindings-4.0.0/package/yast2-pkg-bindings.spec        
2017-09-22 10:44:23.624011068 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings
-Version:        3.2.4
+Version:        4.0.0
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.2.4/src/Package.cc 
new/yast2-pkg-bindings-4.0.0/src/Package.cc
--- old/yast2-pkg-bindings-3.2.4/src/Package.cc 2017-06-21 17:32:25.069598963 
+0200
+++ new/yast2-pkg-bindings-4.0.0/src/Package.cc 2017-09-22 10:44:23.680011068 
+0200
@@ -48,6 +48,7 @@
 #include <zypp/sat/WhatProvides.h>
 #include <zypp/ZYppFactory.h>
 #include <zypp/repo/PackageProvider.h>
+#include <zypp/Locale.h>
 
 #include <fstream>
 #include <sstream>
@@ -736,6 +737,20 @@
     return NULL;
 }
 
+static zypp::ui::Selectable::Ptr find_selectable_product(const string &name)
+{
+  if (name.empty())
+    return NULL;
+
+  using zypp::ui::Selectable;
+  Selectable::Ptr selectable = Selectable::get( zypp::ResKind::product, name );
+
+  if (!selectable)
+    y2warning("Product '%s' not found", name.c_str());
+
+  return selectable;
+}
+
 /**
    @builtin PkgSummary
 
@@ -1455,18 +1470,17 @@
 
 /**
  * @builtin PkgUpdateAll
- * @param map<string,any> update_options Options for the solver. All 
parameters are optional,
- *     if a parameter is missing the default value from the package manager 
(libzypp) is used.
- *     Currently supported options: <tt>NONE</tt>
+ * @param map<string,any> update_options obsolete, not used anymore
  *
  * @short Update installed packages
  * @description
  * Perform a distribution upgrade. This function solves
  * dependencies.
  *
- * Symbols and integer values returned: <tt>NONE</tt>
+ * Note: Changes the recommended packages solver flag, enables installing
+ * the recommended packages even for the following solver runs.
  *
- * @return map<symbol,integer> summary of the update
+ * @return map<symbol,integer> obsolete, empty map now
  */
 
 YCPValue
@@ -1498,28 +1512,19 @@
        y2error("'keep_installed_patches' flag is obsoleted and should not be 
used, check the code!");
     }
 
-
-    YCPMap data;
-
     try
     {
-       // store the current ignoreAlreadyRecommended flag
-       bool ignore_recommended_bak = 
zypp_ptr()->resolver()->ignoreAlreadyRecommended();
        // in full distupgrade enable recommended packages - zypper 
compatibility
        y2milestone("Setting ignoreAlreadyRecommended to false");
        zypp_ptr()->resolver()->setIgnoreAlreadyRecommended(false);
 
        // solve upgrade, get statistics
        zypp_ptr()->resolver()->doUpgrade();
-
-       // set the original flag
-       y2milestone("Reverting ignoreAlreadyRecommended to: %s", 
ignore_recommended_bak ? "true" : "false");
-       
zypp_ptr()->resolver()->setIgnoreAlreadyRecommended(ignore_recommended_bak);
     }
     catch (...)
     {}
 
-    return data;
+    return YCPMap();
 }
 
 
@@ -2728,6 +2733,109 @@
     return YCPBoolean( false );
 }
 
+/**
+   @builtin PrdGetLicenseToConfirm
+
+   @short Return the product's license to confirm
+   @param string name of a product
+   @param string locale code (for instance, "en_US.UTF-8")
+   @return string license to confirm
+ */
+YCPValue
+PkgFunctions::PrdGetLicenseToConfirm(const YCPString& product, const 
YCPString& localeCode)
+{
+  zypp::ui::Selectable::Ptr selectable = 
find_selectable_product(product->value());
+  zypp::Locale locale(localeCode->value());
+
+  if (!selectable)
+    return YCPVoid();
+
+  return YCPString(selectable->candidateObj().licenseToConfirm(locale));
+}
+
+/**
+   @builtin PrdMarkLicenseConfirmed
+
+   @short Mark a product's license as confirmed
+   @param string name of a product
+   @return boolean true if the license was confirmed
+ */
+YCPValue
+PkgFunctions::PrdMarkLicenseConfirmed(const YCPString& product)
+{
+  zypp::ui::Selectable::Ptr selectable = 
find_selectable_product(product->value());
+
+  if (!selectable)
+    return YCPVoid();
+
+  if (!selectable->hasLicenceConfirmed()) {
+    selectable->setLicenceConfirmed();
+    return YCPBoolean(true);
+  } else {
+    return YCPBoolean(false);
+  }
+}
+
+/**
+   @builtin PrdUnmarkLicenseConfirmed
+
+   @short Unmark a product's license so it is not confirmed anymore
+   @param string name of a product
+   @return boolean true if the license was unconfirmed
+ */
+YCPValue
+PkgFunctions::PrdMarkLicenseNotConfirmed(const YCPString& product)
+{
+  zypp::ui::Selectable::Ptr selectable = 
find_selectable_product(product->value());
+
+  if (!selectable)
+    return YCPVoid();
+
+  if (selectable->hasLicenceConfirmed()) {
+    selectable->setLicenceConfirmed(false);
+    return YCPBoolean(true);
+  } else {
+    return YCPBoolean(false);
+  }
+}
+
+/**
+   @builtin PrdNeedToAcceptLicense
+
+   @short Determines whether a product license needs to be accepted
+   @param string name of a product
+   @return boolean true if the license needs to be accepted.
+ */
+YCPValue
+PkgFunctions::PrdNeedToAcceptLicense(const YCPString& product)
+{
+  zypp::ui::Selectable::Ptr selectable = 
find_selectable_product(product->value());
+
+  if (!selectable)
+    return YCPVoid();
+
+  return YCPBoolean(selectable->candidateObj().needToAcceptLicense());
+}
+
+/**
+   @builtin PrdHasLicenseConfirmed
+
+   @short Product license to confirm
+   @param string name of a product
+   @return boolean true if the license is confirmed
+ */
+YCPValue
+PkgFunctions::PrdHasLicenseConfirmed(const YCPString& product)
+{
+  zypp::ui::Selectable::Ptr selectable = 
find_selectable_product(product->value());
+
+  if (!selectable)
+    return YCPVoid();
+
+  return YCPBoolean(selectable->hasLicenceConfirmed());
+}
+
+
 
/****************************************************************************************
  * @builtin RpmChecksig
  * @short Check signature of RPM
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.2.4/src/PkgFunctions.h 
new/yast2-pkg-bindings-4.0.0/src/PkgFunctions.h
--- old/yast2-pkg-bindings-3.2.4/src/PkgFunctions.h     2017-06-21 
17:32:25.073598963 +0200
+++ new/yast2-pkg-bindings-4.0.0/src/PkgFunctions.h     2017-09-22 
10:44:23.684011068 +0200
@@ -732,6 +732,16 @@
        YCPMap    PkgGetLicensesToConfirm( const YCPList & packages );
        /* TYPEINFO: string(string)*/
        YCPBoolean PkgMarkLicenseConfirmed (const YCPString & package);
+       /* TYPEINFO: string(string)*/
+       YCPValue PrdGetLicenseToConfirm (const YCPString& product, const 
YCPString& localeCode);
+       /* TYPEINFO: boolean(string)*/
+       YCPValue PrdMarkLicenseConfirmed (const YCPString& product);
+       /* TYPEINFO: boolean(string)*/
+       YCPValue PrdMarkLicenseNotConfirmed(const YCPString& product);
+       /* TYPEINFO: boolean(string)*/
+       YCPValue PrdNeedToAcceptLicense (const YCPString& product);
+       /* TYPEINFO: boolean(string)*/
+       YCPValue PrdHasLicenseConfirmed(const YCPString& product);
 
        /* TYPEINFO: boolean(string)*/
        YCPBoolean RpmChecksig( const YCPString & filename );


Reply via email to