Hello community,

here is the log from the commit of package yast2-pkg-bindings for 
openSUSE:Factory checked in at 2015-06-12 21:15:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-pkg-bindings"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes    
2015-04-05 02:03:30.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new/yast2-pkg-bindings.changes   
    2015-06-12 21:15:18.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Jun 10 15:09:51 UTC 2015 - [email protected]
+
+- added support for the file conflicts callbacks (bnc#923590)
+- 3.1.24
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.g0lalU/_old  2015-06-12 21:15:19.000000000 +0200
+++ /var/tmp/diff_new_pack.g0lalU/_new  2015-06-12 21:15:19.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-pkg-bindings-devel-doc
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings-devel-doc
-Version:        3.1.23
+Version:        3.1.24
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-pkg-bindings-%{version}.tar.bz2

++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.g0lalU/_old  2015-06-12 21:15:19.000000000 +0200
+++ /var/tmp/diff_new_pack.g0lalU/_new  2015-06-12 21:15:19.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-pkg-bindings
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings
-Version:        3.1.23
+Version:        3.1.24
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-pkg-bindings-3.1.23.tar.bz2 -> yast2-pkg-bindings-3.1.24.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.23/CONTRIBUTING.md 
new/yast2-pkg-bindings-3.1.24/CONTRIBUTING.md
--- old/yast2-pkg-bindings-3.1.23/CONTRIBUTING.md       2015-03-31 
14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/CONTRIBUTING.md       2015-06-11 
11:10:27.000000000 +0200
@@ -12,13 +12,13 @@
 -----------
 
 If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
+[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
 or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
 
registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
 if you don't have an account yet.)
 
 If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee
+[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee
 that every bug will be fixed, but we'll try.
 
 When creating a bug report, please follow our [bug reporting
@@ -71,7 +71,7 @@
 [widely used
 
conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
 
-If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure
+If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure
 you mention it in the commit message for cross-reference. Use format like
 bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
 
autolinking](https://help.github.com/articles/github-flavored-markdown#references)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-3.1.23/package/yast2-pkg-bindings-devel-doc.spec 
new/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-3.1.23/package/yast2-pkg-bindings-devel-doc.spec     
2015-03-31 14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings-devel-doc.spec     
2015-06-11 11:10:27.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-pkg-bindings-devel-doc
-Version:        3.1.23
+Version:        3.1.24
 Release:        0
 License:        GPL-2.0
 Group:          Documentation/HTML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-3.1.23/package/yast2-pkg-bindings.changes 
new/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-3.1.23/package/yast2-pkg-bindings.changes    
2015-03-31 14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.changes    
2015-06-11 11:10:27.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Jun 10 15:09:51 UTC 2015 - [email protected]
+
+- added support for the file conflicts callbacks (bnc#923590)
+- 3.1.24
+
+-------------------------------------------------------------------
 Tue Mar 31 11:39:34 UTC 2015 - [email protected]
 
 - Pkg::ResolvableProperties(): "version" value contains a full
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-3.1.23/package/yast2-pkg-bindings.spec 
new/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-3.1.23/package/yast2-pkg-bindings.spec       
2015-03-31 14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/package/yast2-pkg-bindings.spec       
2015-06-11 11:10:27.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings
-Version:        3.1.23
+Version:        3.1.24
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.23/src/Callbacks.YCP.cc 
new/yast2-pkg-bindings-3.1.24/src/Callbacks.YCP.cc
--- old/yast2-pkg-bindings-3.1.23/src/Callbacks.YCP.cc  2015-03-31 
14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/src/Callbacks.YCP.cc  2015-06-11 
11:10:27.000000000 +0200
@@ -121,6 +121,10 @@
         ENUM_OUT( ProcessNextStage );
         ENUM_OUT( ProcessProgress );
         ENUM_OUT( ProcessFinished );
+        ENUM_OUT( FileConflictStart );
+        ENUM_OUT( FileConflictProgress );
+        ENUM_OUT( FileConflictReport );
+        ENUM_OUT( FileConflictFinish );
 #undef ENUM_OUT
        // no default! let compiler warn missing values
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.23/src/Callbacks.YCP.h 
new/yast2-pkg-bindings-3.1.24/src/Callbacks.YCP.h
--- old/yast2-pkg-bindings-3.1.23/src/Callbacks.YCP.h   2015-03-31 
14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/src/Callbacks.YCP.h   2015-06-11 
11:10:27.000000000 +0200
@@ -81,7 +81,9 @@
       CB_FinishDeltaDownload, CB_FinishDeltaApply,
       CB_StartDownload, CB_ProgressDownload, CB_DoneDownload, CB_InitDownload, 
CB_DestDownload,
 
-      CB_SourceProbeStart, CB_SourceProbeFailed, CB_SourceProbeSucceeded, 
CB_SourceProbeEnd, CB_SourceProbeProgress, CB_SourceProbeError, 
+      CB_FileConflictStart,  CB_FileConflictProgress,  CB_FileConflictReport, 
CB_FileConflictFinish,
+
+      CB_SourceProbeStart, CB_SourceProbeFailed, CB_SourceProbeSucceeded, 
CB_SourceProbeEnd, CB_SourceProbeProgress, CB_SourceProbeError,
       CB_SourceReportStart, CB_SourceReportProgress, CB_SourceReportError, 
CB_SourceReportEnd, CB_SourceReportInit, CB_SourceReportDestroy,
 
       CB_ScriptStart, CB_ScriptProgress, CB_ScriptProblem, CB_ScriptFinish,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.23/src/Callbacks.cc 
new/yast2-pkg-bindings-3.1.24/src/Callbacks.cc
--- old/yast2-pkg-bindings-3.1.23/src/Callbacks.cc      2015-03-31 
14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/src/Callbacks.cc      2015-06-11 
11:10:27.000000000 +0200
@@ -38,6 +38,7 @@
 #include "zypp/PublicKey.h"
 #include "zypp/Digest.h"
 #include "zypp/base/String.h"
+#include "zypp/sat/FileConflicts.h"
 
 #include <ctime>
 
@@ -1697,6 +1698,96 @@
        }
     };
 
+    ///////////////////////////////////////////////////////////////////
+    // File conflict callbacks
+    ///////////////////////////////////////////////////////////////////
+    struct FileConflictReceive : public Recipient,
+            public 
zypp::callback::ReceiveReport<zypp::target::FindFileConflictstReport>
+    {
+        FileConflictReceive( RecipientCtl & construct_r ) : Recipient( 
construct_r ) {}
+
+        virtual void reportbegin()
+        {
+            CB callback( ycpcb( YCPCallbacks::CB_FileConflictStart) );
+
+            if (callback._set)
+            {
+                callback.evaluate();
+            }
+        }
+
+        virtual bool start( const zypp::ProgressData & progress_r )
+        {
+            return report_progress(progress_r);
+        }
+
+        virtual bool progress( const zypp::ProgressData & progress_r,
+            const zypp::sat::Queue & noFilelist_r )
+        {
+            return report_progress(progress_r);
+        }
+
+        virtual bool result( const zypp::ProgressData & progress_r,
+            const zypp::sat::Queue & noFilelist_r,
+            const zypp::sat::FileConflicts & conflicts_r )
+        {
+            CB callback( ycpcb( YCPCallbacks::CB_FileConflictReport) );
+
+            if (!callback._set)
+            {
+                // continue
+                return true;
+            }
+
+            YCPList excluded_packages;
+            for_(iter, noFilelist_r.begin(), noFilelist_r.end())
+            {
+                // convert solvable ID to a Package
+                zypp::Package::Ptr 
pkg(zypp::make<zypp::Package>(zypp::sat::Solvable(*iter)));
+                if (pkg) {
+                    excluded_packages->add(YCPString(pkg->name() + "-" +
+                    pkg->edition().asString() + "-" + pkg->arch().asString()));
+                }
+            }
+
+            YCPList conflicts;
+            for_(iter, conflicts_r.begin(), conflicts_r.end())
+            {
+                conflicts->add(YCPString(iter->asUserString()));
+            }
+
+            callback.addList(excluded_packages);
+            callback.addList(conflicts);
+
+            return callback.evaluateBool();
+        }
+
+        virtual void reportend()
+        {
+            CB callback( ycpcb( YCPCallbacks::CB_FileConflictFinish) );
+
+            if (callback._set)
+            {
+                callback.evaluate();
+            }
+        }
+
+    private:
+
+        bool report_progress(const zypp::ProgressData & progress_r)
+        {
+            CB callback( ycpcb( YCPCallbacks::CB_FileConflictProgress) );
+
+            // continue
+            if (!callback._set)
+            {
+                return true;
+            }
+
+            callback.addInt(progress_r.reportValue());
+            return callback.evaluateBool();
+        }
+    };
 
 ///////////////////////////////////////////////////////////////////
 }; // namespace ZyppRecipients
@@ -1721,6 +1812,7 @@
     ZyppRecipients::InstallPkgReceive _installPkgReceive;
     ZyppRecipients::RemovePkgReceive  _removePkgReceive;
     ZyppRecipients::DownloadResolvableReceive _providePkgReceive;
+    ZyppRecipients::FileConflictReceive _fileConflictReceive;
 
     // media callback
     ZyppRecipients::MediaChangeReceive   _mediaChangeReceive;
@@ -1758,6 +1850,7 @@
       , _installPkgReceive( *this, pkg )
       , _removePkgReceive( *this )
       , _providePkgReceive( *this, pkg )
+      , _fileConflictReceive( *this )
       , _mediaChangeReceive( *this )
       , _downloadProgressReceive( *this )
       , _scriptExecReceive( *this )
@@ -1777,6 +1870,7 @@
        _installPkgReceive.connect();
        _removePkgReceive.connect();
        _providePkgReceive.connect();
+        _fileConflictReceive.connect();
        _mediaChangeReceive.connect();
        _downloadProgressReceive.connect();
        _scriptExecReceive.connect();
@@ -1799,6 +1893,7 @@
        _installPkgReceive.disconnect();
        _removePkgReceive.disconnect();
        _providePkgReceive.disconnect();
+        _fileConflictReceive.disconnect();
        _mediaChangeReceive.disconnect();
        _downloadProgressReceive.disconnect();
        _scriptExecReceive.disconnect();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.23/src/Callbacks_Register.cc 
new/yast2-pkg-bindings-3.1.24/src/Callbacks_Register.cc
--- old/yast2-pkg-bindings-3.1.23/src/Callbacks_Register.cc     2015-03-31 
14:15:09.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/src/Callbacks_Register.cc     2015-06-11 
11:10:27.000000000 +0200
@@ -664,4 +664,56 @@
     return SET_YCP_CB( CB_DoneSourceRefresh, args);
 }
 
+/**
+ * @builtin CallbackFileConflictStart
+ * @short Register a callback function
+ * @param string args Name of the callback handler function. Required callback 
prototype is <code>void()</code>.
+ * The callback function is evaluated when file conflict solving is started.
+ * @return void
+ */
+YCPValue PkgFunctions::CallbackFileConflictStart( const YCPValue& args )
+{
+    return SET_YCP_CB( CB_FileConflictStart, args);
+}
+
+/**
+ * @builtin CallbackFileConflictProgress
+ * @short Register a callback function
+ * @param string args Name of the callback handler function. Required callback 
prototype is <code>bool(integer percent)</code>.
+ * The returned boolean indicates whether to continue (true) or abort (false).
+ * The callback function is evaluated when file conflict solving is in 
progress.
+ * @return void
+ */
+YCPValue PkgFunctions::CallbackFileConflictProgress( const YCPValue& args )
+{
+    return SET_YCP_CB( CB_FileConflictProgress, args);
+}
+
+/**
+ * @builtin CallbackFileConflictProgress
+ * @short Register a callback function
+ * @param string args Name of the callback handler function. Required callback
+ * prototype is <code>bool(list&lt;string&gt; excluded_packages, 
list&lt;string&gt; conflicts)</code>.
+ * The returned boolean indicates whether to continue (true) or abort (false).
+ * The callback function is evaluated when file conflict solving result is 
available.
+ * @return void
+ */
+YCPValue PkgFunctions::CallbackFileConflictReport( const YCPValue& args )
+{
+    return SET_YCP_CB( CB_FileConflictReport, args);
+}
+
+/**
+ * @builtin CallbackFileConflictFinish
+ * @short Register a callback function
+ * @param string args Name of the callback handler function. Required callback 
prototype is <code>void()</code>.
+ * The callback function is evaluated when file conflict solving is finished.
+ * @return void
+ */
+YCPValue PkgFunctions::CallbackFileConflictFinish( const YCPValue& args )
+{
+    return SET_YCP_CB( CB_FileConflictFinish, args);
+}
+
+
 #undef SET_YCP_CB
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.23/src/PkgFunctions.h 
new/yast2-pkg-bindings-3.1.24/src/PkgFunctions.h
--- old/yast2-pkg-bindings-3.1.23/src/PkgFunctions.h    2015-03-31 
14:15:10.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.24/src/PkgFunctions.h    2015-06-11 
11:10:27.000000000 +0200
@@ -388,6 +388,15 @@
        /* TYPEINFO: void(void()) */
        YCPValue CallbackDoneRefresh( const YCPValue& /*nil*/ args );
 
+        /* TYPEINFO: void(void()) */
+       YCPValue CallbackFileConflictStart( const YCPValue& args );
+        /* TYPEINFO: void(boolean(integer)) */
+       YCPValue CallbackFileConflictProgress( const YCPValue& args );
+        /* TYPEINFO: void(boolean(list<string>,list<string>)) */
+       YCPValue CallbackFileConflictReport( const YCPValue& args );
+        /* TYPEINFO: void(void()) */
+       YCPValue CallbackFileConflictFinish( const YCPValue& args );
+
        // Script (patch installation) callbacks
        /* TYPEINFO: void(void(string,string,string,string)) */
        YCPValue CallbackScriptStart( const YCPValue& /*nil*/ args );


Reply via email to