Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Fri Apr 6 16:37:21 CEST 2007.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2007-04-02 14:26:18.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-pkg-bindings/yast2-pkg-bindings.changes 2007-04-06 13:29:52.577421000 +0200
@@ -1,0 +2,7 @@
+Fri Apr 6 10:30:31 CEST 2007 - lslezak@suse.cz
+
+- added Pkg::CallbackAuthentication() - handle AuthenticationReport
+ callback (#190609)
+- 2.15.14
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.15.13.tar.bz2
New:
----
yast2-pkg-bindings-2.15.14.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.LT6770/_old 2007-04-06 16:36:57.000000000 +0200
+++ /var/tmp/diff_new_pack.LT6770/_new 2007-04-06 16:36:57.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.15.13)
+# spec file for package yast2-pkg-bindings (Version 2.15.14)
#
# Copyright (c) 2007 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.15.13
+Version: 2.15.14
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.15.13.tar.bz2
+Source0: yast2-pkg-bindings-2.15.14.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 perl-XML-Writer rpm-devel sgml-skel yast2-core-devel yast2-devtools
BuildRequires: libzypp-devel >= 2.14.3
@@ -40,7 +40,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.15.13
+%setup -n yast2-pkg-bindings-2.15.14
%build
%{prefix}/bin/y2tool y2autoconf
@@ -71,6 +71,10 @@
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog
+* Fri Apr 06 2007 - lslezak@suse.cz
+- added Pkg::CallbackAuthentication() - handle AuthenticationReport
+ callback (#190609)
+- 2.15.14
* Mon Apr 02 2007 - lslezak@suse.cz
- new callbacks Pkg::CallbackSourceCreateInit/Destroy() and
Pkg::CallbackSourceReportInit() - handle the ctor/dtor of libzypp
++++++ yast2-pkg-bindings-2.15.13.tar.bz2 -> yast2-pkg-bindings-2.15.14.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.15.13/configure new/yast2-pkg-bindings-2.15.14/configure
--- old/yast2-pkg-bindings-2.15.13/configure 2007-04-02 14:16:47.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.14/configure 2007-04-06 13:19:00.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-pkg-bindings 2.15.13.
+# Generated by GNU Autoconf 2.60 for yast2-pkg-bindings 2.15.14.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -713,8 +713,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-pkg-bindings'
PACKAGE_TARNAME='yast2-pkg-bindings'
-PACKAGE_VERSION='2.15.13'
-PACKAGE_STRING='yast2-pkg-bindings 2.15.13'
+PACKAGE_VERSION='2.15.14'
+PACKAGE_STRING='yast2-pkg-bindings 2.15.14'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1429,7 +1429,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.15.13 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.15.14 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1500,7 +1500,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-pkg-bindings 2.15.13:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.15.14:";;
esac
cat <<\_ACEOF
@@ -1608,7 +1608,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-pkg-bindings configure 2.15.13
+yast2-pkg-bindings configure 2.15.14
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1622,7 +1622,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.15.13, which was
+It was created by yast2-pkg-bindings $as_me 2.15.14, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2423,7 +2423,7 @@
# Define the identity of the package.
PACKAGE='yast2-pkg-bindings'
- VERSION='2.15.13'
+ VERSION='2.15.14'
cat >>confdefs.h <<_ACEOF
@@ -2650,7 +2650,7 @@
-VERSION="2.15.13"
+VERSION="2.15.14"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
@@ -21612,7 +21612,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-pkg-bindings $as_me 2.15.13, which was
+This file was extended by yast2-pkg-bindings $as_me 2.15.14, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21665,7 +21665,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-pkg-bindings config.status 2.15.13
+yast2-pkg-bindings config.status 2.15.14
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.15.13/configure.in new/yast2-pkg-bindings-2.15.14/configure.in
--- old/yast2-pkg-bindings-2.15.13/configure.in 2007-04-02 14:16:31.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.14/configure.in 2007-04-06 13:18:46.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.15.13, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.15.14, 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.15.13"
+VERSION="2.15.14"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.15.13/src/Callbacks.cc new/yast2-pkg-bindings-2.15.14/src/Callbacks.cc
--- old/yast2-pkg-bindings-2.15.13/src/Callbacks.cc 2007-03-29 15:24:22.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.14/src/Callbacks.cc 2007-04-06 13:08:34.000000000 +0200
@@ -855,6 +855,68 @@
}
};
+ struct AuthReceive : public Recipient, public zypp::callback::ReceiveReportzypp::media::AuthenticationReport
+ {
+ AuthReceive( RecipientCtl & construct_r ) : Recipient( construct_r ) {}
+
+ virtual bool prompt(const zypp::Url& url, const std::string& msg, zypp::media::AuthData& auth_data)
+ {
+ CB callback( ycpcb( YCPCallbacks::CB_Authentication ) );
+
+ if (callback._set)
+ {
+ callback.addStr(url.asString());
+ callback.addStr(msg);
+ callback.addStr(auth_data.username());
+ callback.addStr(auth_data.password());
+
+ YCPMap cbk(callback.evaluateMap());
+
+ YCPValue ycp_val = cbk->value(YCPString("username"));
+ if (!ycp_val.isNull() && ycp_val->isString())
+ {
+ // set the entered username
+ auth_data.setUserName(ycp_val->asString()->value());
+ }
+ else
+ {
+ y2error("Invalid/missing value 'username'");
+ }
+
+ ycp_val = cbk->value(YCPString("password"));
+ if (!ycp_val.isNull() && ycp_val->isString())
+ {
+ // set the entered password
+ auth_data.setPassword(ycp_val->asString()->value());
+ }
+ else
+ {
+ y2error("Invalid/missing value 'password'");
+ }
+
+ // authentication confirmed?
+ bool ret = false;
+
+ ycp_val = cbk->value(YCPString("continue"));
+ if (!ycp_val.isNull() && ycp_val->isBoolean())
+ {
+ // continue?
+ ret = ycp_val->asBoolean()->value();
+ y2milestone("Use the authentication data: %s", ret ? "true" : "false");
+ }
+ else
+ {
+ y2error("Invalid/missing value 'continue'");
+ }
+
+ return ret;
+ }
+
+ // return the default value from the parent class
+ return zypp::media::AuthenticationReport::prompt(url, msg, auth_data);
+ }
+ };
+
///////////////////////////////////////////////////////////////////
// MediaChangeCallback
///////////////////////////////////////////////////////////////////
@@ -2312,4 +2374,14 @@
return SET_YCP_CB( CB_Message, args );
}
+/**
+ * @builtin CallbackAuthentication
+ * @short Register callback function
+ * @param string func Name of the callback handler function. Required callback prototype is <code>map(string url, string message, string username, string password)</code>. The returned map must contain these items: $[ "username" : string, "password" : string, "continue" : boolean ]. If <code>"continue"</code> value is false or is missing the authentification (and the download process) is canceled. The callback function is evaluated when user authentication is required to download the requested file.
+ * @return void
+ */
+YCPValue PkgModuleFunctions::CallbackAuthentication( const YCPString& func ) {
+ return SET_YCP_CB( CB_Authentication, func );
+}
+
#undef SET_YCP_CB
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.15.13/src/Callbacks.YCP.h new/yast2-pkg-bindings-2.15.14/src/Callbacks.YCP.h
--- old/yast2-pkg-bindings-2.15.13/src/Callbacks.YCP.h 2007-03-23 15:09:55.000000000 +0100
+++ new/yast2-pkg-bindings-2.15.14/src/Callbacks.YCP.h 2007-04-03 15:22:38.000000000 +0200
@@ -88,6 +88,8 @@
CB_ScriptStart, CB_ScriptProgress, CB_ScriptProblem, CB_ScriptFinish,
CB_Message,
+ CB_Authentication,
+
CB_MediaChange,
CB_SourceChange,
CB_ResolvableReport,
@@ -139,6 +141,8 @@
ENUM_OUT( ScriptFinish );
ENUM_OUT( Message );
+ ENUM_OUT( Authentication );
+
ENUM_OUT( SourceCreateStart );
ENUM_OUT( SourceCreateProgress );
ENUM_OUT( SourceCreateError );
@@ -414,6 +418,11 @@
bool evaluateBool( const bool & def_r = false ) {
return evaluate( YT_BOOLEAN ) ? _result->asBoolean()->value() : def_r;
}
+
+ YCPMap evaluateMap( const YCPMap def_r = YCPMap())
+ {
+ return evaluate( YT_MAP ) ? _result->asMap() : def_r;
+ }
};
private:
const YCPCallbacks & _ycpcb;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.15.13/src/PkgModuleFunctions.h new/yast2-pkg-bindings-2.15.14/src/PkgModuleFunctions.h
--- old/yast2-pkg-bindings-2.15.13/src/PkgModuleFunctions.h 2007-03-23 15:11:47.000000000 +0100
+++ new/yast2-pkg-bindings-2.15.14/src/PkgModuleFunctions.h 2007-04-03 14:46:05.000000000 +0200
@@ -270,6 +270,9 @@
YCPValue CallbackMessage( const YCPString& args );
/* TYPEINFO: void(string) */
+ YCPValue CallbackAuthentication( const YCPString& func );
+
+ /* TYPEINFO: void(string) */
YCPValue CallbackMediaChange (const YCPString& func);
/* TYPEINFO: void(string) */
YCPValue CallbackSourceChange (const YCPString& func);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.15.13/VERSION new/yast2-pkg-bindings-2.15.14/VERSION
--- old/yast2-pkg-bindings-2.15.13/VERSION 2007-04-02 13:58:34.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.14/VERSION 2007-04-06 10:30:08.000000000 +0200
@@ -1 +1 @@
-2.15.13
+2.15.14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org