Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Tue Jun 6 22:26:26 CEST 2006.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2006-06-05 16:08:31.000000000 +0200
+++ yast2-pkg-bindings/yast2-pkg-bindings.changes 2006-06-06 16:49:02.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Jun 6 16:11:20 CEST 2006 - lslezak@suse.cz
+
+- added new callback bindings (CallbackProgressSourceRefresh(),
+ CallbackAcceptWrongDigest(), CallbackAcceptUnknownDigest())
+- 2.13.83
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.13.82.tar.bz2
New:
----
yast2-pkg-bindings-2.13.83.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.ZPj0Or/_old 2006-06-06 22:26:20.000000000 +0200
+++ /var/tmp/diff_new_pack.ZPj0Or/_new 2006-06-06 22:26:20.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.13.82)
+# spec file for package yast2-pkg-bindings (Version 2.13.83)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-pkg-bindings
-Version: 2.13.82
+Version: 2.13.83
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.13.82.tar.bz2
+Source0: yast2-pkg-bindings-2.13.83.tar.bz2
prefix: /usr
BuildRequires: blocxx-devel boost boost-devel dbus-1-devel docbook-xsl-stylesheets doxygen gcc-c++ hal-devel libgcrypt-devel libxcrypt-devel libxslt libzypp libzypp-devel perl-XML-Writer rpm-devel sgml-skel yast2-core-devel yast2-devtools
Summary: YaST2 Package Manager Access
@@ -36,7 +36,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.13.82
+%setup -n yast2-pkg-bindings-2.13.83
%build
%{prefix}/bin/y2tool y2autoconf
@@ -67,6 +67,10 @@
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog -n yast2-pkg-bindings
+* Tue Jun 06 2006 - lslezak@suse.cz
+- added new callback bindings (CallbackProgressSourceRefresh(),
+ CallbackAcceptWrongDigest(), CallbackAcceptUnknownDigest())
+- 2.13.83
* Mon Jun 05 2006 - lslezak@suse.cz
- updated documentation - descriptions of the functions,
added obsoleted/don't use notes
++++++ yast2-pkg-bindings-2.13.82.tar.bz2 -> yast2-pkg-bindings-2.13.83.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.82/VERSION new/yast2-pkg-bindings-2.13.83/VERSION
--- old/yast2-pkg-bindings-2.13.82/VERSION 2006-06-05 15:33:14.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.83/VERSION 2006-06-06 14:58:30.000000000 +0200
@@ -1 +1 @@
-2.13.82
+2.13.83
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.82/configure new/yast2-pkg-bindings-2.13.83/configure
--- old/yast2-pkg-bindings-2.13.82/configure 2006-06-05 15:47:42.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.83/configure 2006-06-06 16:26:50.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for yast2-pkg-bindings 2.13.82.
+# Generated by GNU Autoconf 2.59 for yast2-pkg-bindings 2.13.83.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -423,8 +423,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-pkg-bindings'
PACKAGE_TARNAME='yast2-pkg-bindings'
-PACKAGE_VERSION='2.13.82'
-PACKAGE_STRING='yast2-pkg-bindings 2.13.82'
+PACKAGE_VERSION='2.13.83'
+PACKAGE_STRING='yast2-pkg-bindings 2.13.83'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -971,7 +971,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-pkg-bindings 2.13.82 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.13.83 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1038,7 +1038,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-pkg-bindings 2.13.82:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.13.83:";;
esac
cat <<\_ACEOF
@@ -1184,7 +1184,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-yast2-pkg-bindings configure 2.13.82
+yast2-pkg-bindings configure 2.13.83
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1198,7 +1198,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-pkg-bindings $as_me 2.13.82, which was
+It was created by yast2-pkg-bindings $as_me 2.13.83, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1928,7 +1928,7 @@
# Define the identity of the package.
PACKAGE='yast2-pkg-bindings'
- VERSION='2.13.82'
+ VERSION='2.13.83'
cat >>confdefs.h <<_ACEOF
@@ -2139,7 +2139,7 @@
-VERSION="2.13.82"
+VERSION="2.13.83"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Michael Andres "
@@ -20273,7 +20273,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2-pkg-bindings $as_me 2.13.82, which was
+This file was extended by yast2-pkg-bindings $as_me 2.13.83, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20336,7 +20336,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-pkg-bindings config.status 2.13.82
+yast2-pkg-bindings config.status 2.13.83
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.82/configure.in new/yast2-pkg-bindings-2.13.83/configure.in
--- old/yast2-pkg-bindings-2.13.82/configure.in 2006-06-05 15:47:29.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.83/configure.in 2006-06-06 16:26:35.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.13.16 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.13.82, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.13.83, http://bugs.opensuse.org/, yast2-pkg-bindings)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.82"
+VERSION="2.13.83"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Michael Andres "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.82/src/Callbacks.YCP.h new/yast2-pkg-bindings-2.13.83/src/Callbacks.YCP.h
--- old/yast2-pkg-bindings-2.13.82/src/Callbacks.YCP.h 2006-04-26 11:31:26.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.83/src/Callbacks.YCP.h 2006-06-06 15:44:58.000000000 +0200
@@ -71,7 +71,7 @@
CB_StartProvide, CB_ProgressProvide, CB_DoneProvide,
CB_StartPackage, CB_ProgressPackage, CB_DonePackage,
CB_StartDownload, CB_ProgressDownload, CB_DoneDownload,
- CB_StartSourceRefresh, CB_ErrorSourceRefresh, CB_DoneSourceRefresh,
+ CB_StartSourceRefresh, CB_ErrorSourceRefresh, CB_DoneSourceRefresh, CB_ProgressSourceRefresh,
CB_MediaChange,
CB_SourceChange,
CB_ResolvableReport,
@@ -87,6 +87,7 @@
CB_AcceptUnsignedFile,
CB_AcceptFileWithoutChecksum,
CB_AcceptVerificationFailed,
+ CB_AcceptWrongDigest, CB_AcceptUnknownDigest,
CB_TrustedKeyAdded,
CB_TrustedKeyRemoved
};
@@ -119,6 +120,7 @@
ENUM_OUT( StartSourceRefresh );
ENUM_OUT( ErrorSourceRefresh );
ENUM_OUT( DoneSourceRefresh );
+ ENUM_OUT( ProgressSourceRefresh );
ENUM_OUT( MediaChange );
ENUM_OUT( SourceChange );
ENUM_OUT( YouProgress );
@@ -136,6 +138,8 @@
ENUM_OUT( AcceptFileWithoutChecksum );
ENUM_OUT( TrustedKeyAdded );
ENUM_OUT( TrustedKeyRemoved );
+ ENUM_OUT( AcceptWrongDigest );
+ ENUM_OUT( AcceptUnknownDigest );
#undef ENUM_OUT
// no default! let compiler warn missing values
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.82/src/Callbacks.cc new/yast2-pkg-bindings-2.13.83/src/Callbacks.cc
--- old/yast2-pkg-bindings-2.13.82/src/Callbacks.cc 2006-05-17 09:01:42.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.83/src/Callbacks.cc 2006-06-06 16:30:45.000000000 +0200
@@ -591,6 +591,22 @@
callback.evaluate();
}
}
+
+ virtual bool progress(int value, zypp::Source_Ref source)
+ {
+ CB callback( ycpcb( YCPCallbacks::CB_ProgressSourceRefresh) );
+
+ if (callback._set)
+ {
+ callback.addInt( value );
+ callback.addInt( source.numericId() );
+ return callback.evaluateBool();
+ }
+
+ // return default value from the parent class
+ return zypp::source::RefreshSourceReport::progress(value, source);
+ }
+
};
///////////////////////////////////////////////////////////////////
@@ -839,6 +855,38 @@
return zypp::DigestReport::askUserToAcceptNoDigest(file);
}
+
+ virtual bool askUserToAccepUnknownDigest( const zypp::Pathname &file, const std::string &name )
+ {
+ CB callback( ycpcb( YCPCallbacks::CB_AcceptUnknownDigest) );
+
+ if (callback._set)
+ {
+ callback.addStr(file.asString());
+ callback.addStr(name);
+
+ return callback.evaluateBool();
+ }
+
+ return zypp::DigestReport::askUserToAccepUnknownDigest(file, name);
+ }
+
+ virtual bool askUserToAcceptWrongDigest( const zypp::Pathname &file, const std::string &requested, const std::string &found )
+ {
+ CB callback( ycpcb( YCPCallbacks::CB_AcceptWrongDigest) );
+
+ if (callback._set)
+ {
+ callback.addStr(file.asString());
+ callback.addStr(requested);
+ callback.addStr(found);
+
+ return callback.evaluateBool();
+ }
+
+ return zypp::DigestReport::askUserToAcceptWrongDigest(file, requested, found);
+ }
+
};
@@ -1121,6 +1169,16 @@
YCPValue PkgModuleFunctions::CallbackStartSourceRefresh( const YCPString& args ) {
return SET_YCP_CB( CB_StartSourceRefresh, args );
}
+/**
+ * @builtin CallbackProgressSourceRefresh
+ * @short Register a callback function
+ * @param string args Name of the callback handler function. Required callback
+ * prototype is <code>boolean(integer value, integer sourceId)</code>.
+ * @return void
+ */
+YCPValue PkgModuleFunctions::CallbackProgressSourceRefresh( const YCPString& args ) {
+ return SET_YCP_CB( CB_ProgressSourceRefresh, args );
+}
YCPValue PkgModuleFunctions::CallbackErrorSourceRefresh( const YCPString& args ) {
return SET_YCP_CB( CB_ErrorSourceRefresh, args );
}
@@ -1183,6 +1241,28 @@
}
/**
+ * @builtin CallbackAcceptWrongDigest
+ * @short Register callback function
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename, string requested_digest, string found_digest)</code>. The callback function should ask user whether the wrong digest can be accepted, returned true value means to accept the file.
+ * @return void
+ */
+YCPValue PkgModuleFunctions::CallbackAcceptWrongDigest( const YCPString& func)
+{
+ return SET_YCP_CB( CB_AcceptWrongDigest, func );
+}
+
+/**
+ * @builtin CallbackAcceptUnknownDigest
+ * @short Register callback function
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename, string name)</code>. The callback function should ask user whether the uknown digest can be accepted, returned true value means to accept the digest.
+ * @return void
+ */
+YCPValue PkgModuleFunctions::CallbackAcceptUnknownDigest( const YCPString& func)
+{
+ return SET_YCP_CB( CB_AcceptUnknownDigest, func );
+}
+
+/**
* @builtin CallbackTrustedKeyAdded
* @short Register callback function
* @param string args Name of the callback handler function. Required callback prototype is <code>void(string keyid, string keyname)</code>. The callback function should inform user that a trusted key has been added.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.82/src/PkgModuleFunctions.h new/yast2-pkg-bindings-2.13.83/src/PkgModuleFunctions.h
--- old/yast2-pkg-bindings-2.13.82/src/PkgModuleFunctions.h 2006-05-29 13:32:29.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.83/src/PkgModuleFunctions.h 2006-06-06 16:09:30.000000000 +0200
@@ -158,6 +158,8 @@
/* TYPEINFO: void(string) */
YCPValue CallbackStartSourceRefresh( const YCPString& func);
/* TYPEINFO: void(string) */
+ YCPValue CallbackProgressSourceRefresh( const YCPString& func);
+ /* TYPEINFO: void(string) */
YCPValue CallbackErrorSourceRefresh( const YCPString& func);
/* TYPEINFO: void(string) */
YCPValue CallbackDoneSourceRefresh( const YCPString& func);
@@ -206,6 +208,10 @@
/* TYPEINFO: void(string) */
YCPValue CallbackAcceptVerificationFailed( const YCPString& func );
/* TYPEINFO: void(string) */
+ YCPValue CallbackAcceptWrongDigest( const YCPString& func);
+ /* TYPEINFO: void(string) */
+ YCPValue CallbackAcceptUnknownDigest( const YCPString& func);
+ /* TYPEINFO: void(string) */
YCPValue CallbackTrustedKeyAdded( const YCPString& func );
/* TYPEINFO: void(string) */
YCPValue CallbackTrustedKeyRemoved( const YCPString& func );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org