Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Tue Jan 15 08:52:27 CET 2008.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-01-07 16:52:45.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-01-14 17:22:12.977102000 +0100
@@ -1,0 +2,11 @@
+Mon Jan 14 16:32:38 CET 2008 - lslezak@suse.cz
+
+- 2.16.10
+
+-------------------------------------------------------------------
+Thu Jan 10 16:02:50 CET 2008 - lslezak@suse.cz
+
+- added Pkg::CheckGPGKeyFile() function - check whether the file
+ contains a valid GPG key
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.16.9.tar.bz2
New:
----
yast2-pkg-bindings-2.16.10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.a14970/_old 2008-01-15 08:52:15.000000000 +0100
+++ /var/tmp/diff_new_pack.a14970/_new 2008-01-15 08:52:15.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings-devel-doc (Version 2.16.9)
+# spec file for package yast2-pkg-bindings-devel-doc (Version 2.16.10)
#
# Copyright (c) 2008 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-devel-doc
-Version: 2.16.9
+Version: 2.16.10
Release: 1
License: GPL v2 or later
Group: Documentation/HTML
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.16.9.tar.bz2
+Source0: yast2-pkg-bindings-2.16.10.tar.bz2
Prefix: /usr
# same as in the main package (because we use the same configure.in.in)
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
@@ -37,7 +37,7 @@
Ladislav Slez�k
%prep
-%setup -n yast2-pkg-bindings-2.16.9
+%setup -n yast2-pkg-bindings-2.16.10
# build only documentation, ignore all other directories
echo "doc" > SUBDIRS
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.a14970/_old 2008-01-15 08:52:15.000000000 +0100
+++ /var/tmp/diff_new_pack.a14970/_new 2008-01-15 08:52:15.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.16.9)
+# spec file for package yast2-pkg-bindings (Version 2.16.10)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,18 +11,18 @@
# norootforbuild
Name: yast2-pkg-bindings
-Version: 2.16.9
+Version: 2.16.10
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.16.9.tar.bz2
+Source0: yast2-pkg-bindings-2.16.10.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 >= 3.25.0
-BuildRequires: libzypp >= 3.25.0
-# RepoManager::metadataPath()
-Requires: libzypp >= 3.25.0
+BuildRequires: libzypp-devel >= 4.1.8
+BuildRequires: libzypp >= 4.1.8
+# created and expires dates in zypp::PublicKey
+Requires: libzypp >= 4.1.8
Summary: YaST2 - Package Manager Access
%description
@@ -40,7 +40,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.16.9
+%setup -n yast2-pkg-bindings-2.16.10
# build only the library, ignore documentation (it is in devel-doc package)
echo "src" > SUBDIRS
@@ -72,6 +72,11 @@
%{_libdir}/YaST2/plugin/libpy2Pkg.so
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog
+* Mon Jan 14 2008 - lslezak@suse.cz
+- 2.16.10
+* Thu Jan 10 2008 - lslezak@suse.cz
+- added Pkg::CheckGPGKeyFile() function - check whether the file
+ contains a valid GPG key
* Mon Jan 07 2008 - lslezak@suse.cz
- added missing "log.h" file in Makefile.am
- added GPG key management functions (FATE 300754):
++++++ yast2-pkg-bindings-2.16.9.tar.bz2 -> yast2-pkg-bindings-2.16.10.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.9/configure new/yast2-pkg-bindings-2.16.10/configure
--- old/yast2-pkg-bindings-2.16.9/configure 2008-01-07 16:51:11.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.10/configure 2008-01-14 17:21:13.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-pkg-bindings 2.16.9.
+# Generated by GNU Autoconf 2.61 for yast2-pkg-bindings 2.16.10.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-pkg-bindings'
PACKAGE_TARNAME='yast2-pkg-bindings'
-PACKAGE_VERSION='2.16.9'
-PACKAGE_STRING='yast2-pkg-bindings 2.16.9'
+PACKAGE_VERSION='2.16.10'
+PACKAGE_STRING='yast2-pkg-bindings 2.16.10'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1447,7 +1447,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.16.9 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.16.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1518,7 +1518,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-pkg-bindings 2.16.9:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.16.10:";;
esac
cat <<\_ACEOF
@@ -1627,7 +1627,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-pkg-bindings configure 2.16.9
+yast2-pkg-bindings configure 2.16.10
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1641,7 +1641,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.16.9, which was
+It was created by yast2-pkg-bindings $as_me 2.16.10, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2462,7 +2462,7 @@
# Define the identity of the package.
PACKAGE='yast2-pkg-bindings'
- VERSION='2.16.9'
+ VERSION='2.16.10'
cat >>confdefs.h <<_ACEOF
@@ -2689,7 +2689,7 @@
-VERSION="2.16.9"
+VERSION="2.16.10"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
@@ -21198,7 +21198,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.16.9, which was
+This file was extended by yast2-pkg-bindings $as_me 2.16.10, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21251,7 +21251,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-pkg-bindings config.status 2.16.9
+yast2-pkg-bindings config.status 2.16.10
configured by $0, generated by GNU Autoconf 2.61,
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.16.9/configure.in new/yast2-pkg-bindings-2.16.10/configure.in
--- old/yast2-pkg-bindings-2.16.9/configure.in 2008-01-07 16:51:01.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.10/configure.in 2008-01-14 17:21:03.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.15.9 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.16.9, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.16.10, 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.16.9"
+VERSION="2.16.10"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.9/src/Keyring.cc new/yast2-pkg-bindings-2.16.10/src/Keyring.cc
--- old/yast2-pkg-bindings-2.16.9/src/Keyring.cc 2008-01-07 16:28:10.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.10/src/Keyring.cc 2008-01-14 17:19:31.000000000 +0100
@@ -29,10 +29,16 @@
#include
#include
#include
+#include
#include
#include
#include
+#include
+
+/*
+ Textdomain "pkg-bindings"
+*/
/****************************************************************************************
* @builtin ImportGPGKey
@@ -67,6 +73,40 @@
return YCPVoid();
}
+class GPGMap
+{
+ public:
+
+ GPGMap(const zypp::PublicKey &key, bool trusted)
+ {
+ gpg_map->add(YCPString("id"), YCPString(key.id()));
+ gpg_map->add(YCPString("name"), YCPString(key.name()));
+ gpg_map->add(YCPString("fingerprint"), YCPString(key.fingerprint()));
+
+ // is the key trusted?
+ gpg_map->add(YCPString("trusted"), YCPBoolean(trusted));
+
+ zypp::Date date(key.created());
+ // %x = date only, see man strftime
+ gpg_map->add(YCPString("created"), YCPString(date.form("%x")));
+ gpg_map->add(YCPString("created_raw"), YCPInteger(zypp::Date::ValueType(date)));
+
+ date = key.expires();
+ std::string expires((date == 0) ? _("Never") : date.form("%x"));
+ gpg_map->add(YCPString("expires"), YCPString(expires));
+ gpg_map->add(YCPString("expires_raw"), YCPInteger(zypp::Date::ValueType(date)));
+ }
+
+ YCPMap getMap() const
+ {
+ return gpg_map;
+ }
+
+ private:
+
+ YCPMap gpg_map;
+};
+
// A helper class
// converts PublicKey to YCPMap and adds it to an YCPList
class PublicKeyAdder : public std::unary_function
@@ -81,16 +121,9 @@
void operator() (const zypp::PublicKey &key)
{
- YCPMap ret;
+ GPGMap gpgmap(key, trusted);
- ret->add(YCPString("id"), YCPString(key.id()));
- ret->add(YCPString("name"), YCPString(key.name()));
- ret->add(YCPString("fingerprint"), YCPString(key.fingerprint()));
-
- // is the key trusted?
- ret->add(YCPString("trusted"), YCPBoolean(trusted));
-
- return list->add(ret);
+ return list->add(gpgmap.getMap());
}
private:
@@ -108,7 +141,8 @@
* Read known or trusted keys from the package manager
*
* @param boolean trusted If set to true trusted keys are returned,
- * @return list List of maps $[ "id" : string , "name" : string, "fingerprint" : string, "trusted" : boolean ], nil when an error occurred
+ * @return list List of maps $[ "id" : string , "name" : string, "fingerprint" : string, "trusted" : boolean,
+ * "created" : string, "created_raw" : integer, "expires" : string, "expires_raw" : integer ] or nil when an error occurred
**/
YCPValue PkgFunctions::GPGKeys(const YCPBoolean& trusted)
{
@@ -169,3 +203,26 @@
return YCPBoolean(ret);
}
+
+/****************************************************************************************
+ * @builtin CheckGPGKeyFile
+ * @short Check whether the file contains a valid GPG key
+ *
+ * @param keyfile path to the file
+ * @return true if the GPG key is valid
+ **/
+YCPValue PkgFunctions::CheckGPGKeyFile(const YCPString& keyfile)
+{
+ try
+ {
+ zypp::PublicKey key(keyfile->value());
+
+ GPGMap gpgmap(key, false);
+ return gpgmap.getMap();
+ }
+ catch(...)
+ {}
+
+ return YCPVoid();
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.9/src/PkgFunctions.h new/yast2-pkg-bindings-2.16.10/src/PkgFunctions.h
--- old/yast2-pkg-bindings-2.16.9/src/PkgFunctions.h 2008-01-07 15:33:32.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.10/src/PkgFunctions.h 2008-01-10 14:08:11.000000000 +0100
@@ -693,6 +693,8 @@
YCPValue GPGKeys(const YCPBoolean& trusted);
/* TYPEINFO: boolean(string,boolean)*/
YCPValue DeleteGPGKey(const YCPString&, const YCPBoolean&);
+ /* TYPEINFO: map(string)*/
+ YCPValue CheckGPGKeyFile(const YCPString&);
/* TYPEINFO: boolean()*/
YCPValue SourceReleaseAll ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.9/VERSION new/yast2-pkg-bindings-2.16.10/VERSION
--- old/yast2-pkg-bindings-2.16.9/VERSION 2008-01-07 16:39:43.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.10/VERSION 2008-01-14 16:33:10.000000000 +0100
@@ -1 +1 @@
-2.16.9
+2.16.10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org