Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Thu Apr 6 16:47:37 CEST 2006.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2006-04-05 18:53:42.000000000 +0200
+++ yast2-pkg-bindings/yast2-pkg-bindings.changes 2006-04-06 16:07:10.000000000 +0200
@@ -1,0 +2,11 @@
+Thu Apr 6 15:50:05 CEST 2006 - lslezak@suse.cz
+
+- added Pkg::ImportGPGKey() (#164001)
+- 2.13.49
+
+-------------------------------------------------------------------
+Thu Apr 6 15:11:38 CEST 2006 - visnov@suse.cz
+
+- implemented SourceCleanupBroken (#157100)
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.13.48.tar.bz2
New:
----
yast2-pkg-bindings-2.13.49.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.yoIYSU/_old 2006-04-06 16:47:27.000000000 +0200
+++ /var/tmp/diff_new_pack.yoIYSU/_new 2006-04-06 16:47:27.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.13.48)
+# spec file for package yast2-pkg-bindings (Version 2.13.49)
#
# 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.48
+Version: 2.13.49
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.13.48.tar.bz2
+Source0: yast2-pkg-bindings-2.13.49.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.48
+%setup -n yast2-pkg-bindings-2.13.49
%build
%{prefix}/bin/y2tool y2autoconf
@@ -67,6 +67,11 @@
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog -n yast2-pkg-bindings
+* Thu Apr 06 2006 - lslezak@suse.cz
+- added Pkg::ImportGPGKey() (#164001)
+- 2.13.49
+* Thu Apr 06 2006 - visnov@suse.cz
+- implemented SourceCleanupBroken (#157100)
* Wed Apr 05 2006 - jsrain@suse.de
- implemented SourceChangeUrl (#163748)
- 2.13.48
++++++ yast2-pkg-bindings-2.13.48.tar.bz2 -> yast2-pkg-bindings-2.13.49.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/VERSION new/yast2-pkg-bindings-2.13.49/VERSION
--- old/yast2-pkg-bindings-2.13.48/VERSION 2006-04-05 18:52:00.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/VERSION 2006-04-06 16:08:43.000000000 +0200
@@ -1 +1 @@
-2.13.48
+2.13.49
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/configure new/yast2-pkg-bindings-2.13.49/configure
--- old/yast2-pkg-bindings-2.13.48/configure 2006-04-05 18:52:50.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/configure 2006-03-27 16:17:02.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.48.
+# Generated by GNU Autoconf 2.59 for yast2-pkg-bindings 2.13.41.
#
# Report bugs to http://www.suse.de/feedback.
#
@@ -423,8 +423,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-pkg-bindings'
PACKAGE_TARNAME='yast2-pkg-bindings'
-PACKAGE_VERSION='2.13.48'
-PACKAGE_STRING='yast2-pkg-bindings 2.13.48'
+PACKAGE_VERSION='2.13.41'
+PACKAGE_STRING='yast2-pkg-bindings 2.13.41'
PACKAGE_BUGREPORT='http://www.suse.de/feedback'
ac_unique_file="RPMNAME"
@@ -959,7 +959,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.48 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.13.41 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1026,7 +1026,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-pkg-bindings 2.13.48:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.13.41:";;
esac
cat <<\_ACEOF
@@ -1169,7 +1169,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-yast2-pkg-bindings configure 2.13.48
+yast2-pkg-bindings configure 2.13.41
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1183,7 +1183,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.48, which was
+It was created by yast2-pkg-bindings $as_me 2.13.41, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1913,7 +1913,7 @@
# Define the identity of the package.
PACKAGE='yast2-pkg-bindings'
- VERSION='2.13.48'
+ VERSION='2.13.41'
cat >>confdefs.h <<_ACEOF
@@ -2124,7 +2124,7 @@
-VERSION="2.13.48"
+VERSION="2.13.41"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Michael Andres "
@@ -20042,7 +20042,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2-pkg-bindings $as_me 2.13.48, which was
+This file was extended by yast2-pkg-bindings $as_me 2.13.41, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20105,7 +20105,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-pkg-bindings config.status 2.13.48
+yast2-pkg-bindings config.status 2.13.41
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.48/configure.in new/yast2-pkg-bindings-2.13.49/configure.in
--- old/yast2-pkg-bindings-2.13.48/configure.in 2006-04-05 18:52:39.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/configure.in 2006-03-27 16:16:48.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.13.48, http://www.suse.de/feedback, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.13.41, http://www.suse.de/feedback, 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.48"
+VERSION="2.13.41"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Michael Andres "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/pkg-bindings.pot new/yast2-pkg-bindings-2.13.49/pkg-bindings.pot
--- old/yast2-pkg-bindings-2.13.48/pkg-bindings.pot 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pkg-bindings-2.13.49/pkg-bindings.pot 2006-03-27 16:52:32.000000000 +0200
@@ -0,0 +1,21 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-03-27 16:52+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/Package.cc:1669 src/Package.cc:1729
+msgid "See /var/log/YaST2/badlist for more information."
+msgstr ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/src/Keyring.cc new/yast2-pkg-bindings-2.13.49/src/Keyring.cc
--- old/yast2-pkg-bindings-2.13.48/src/Keyring.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pkg-bindings-2.13.49/src/Keyring.cc 2006-04-06 15:39:35.000000000 +0200
@@ -0,0 +1,63 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: Keyring.cc
+
+ Summary: Access to the Package Manager
+ Namespace: Pkg
+ Purpose: Access to the Package Manager - keyring related bindings
+
+/-*/
+
+#include
+#include "PkgModuleFunctions.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+/****************************************************************************************
+ * @builtin ImportGPGKey
+ * @short Import a GPG key into the keyring
+ * @description
+ * Import a GPG key into the keyring in the package manager.
+ *
+ * @param string filename Path to the key file
+ * @param boolean trusted Set to true if the key is trusted
+ * @return void
+ **/
+YCPValue
+PkgModuleFunctions::ImportGPGKey(const YCPString& filename, const YCPBoolean& trusted)
+{
+ bool trusted_key = trusted->value();
+ std::string file = filename->value();
+
+ y2milestone("importing %s key: %s", (trusted_key) ? "trusted" : "untrusted", file);
+
+ try
+ {
+ zypp_ptr()->keyRing()->importKey(file, trusted_key);
+ }
+ catch (...)
+ {
+ y2error("Key %s: Import failed", file);
+ }
+
+ return YCPVoid();
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/src/Makefile.am new/yast2-pkg-bindings-2.13.49/src/Makefile.am
--- old/yast2-pkg-bindings-2.13.48/src/Makefile.am 2006-03-29 19:33:25.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/src/Makefile.am 2006-04-06 11:27:57.000000000 +0200
@@ -28,6 +28,7 @@
Selection.cc \
Target.cc \
Source.cc \
+ Keyring.cc \
Callbacks.h \
Callbacks.YCP.h \
Callbacks.cc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/src/Makefile.in new/yast2-pkg-bindings-2.13.49/src/Makefile.in
--- old/yast2-pkg-bindings-2.13.48/src/Makefile.in 2006-04-05 18:52:55.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/src/Makefile.in 2006-04-06 11:28:23.000000000 +0200
@@ -63,7 +63,7 @@
am_libpy2Pkg_la_OBJECTS = PkgError.lo Y2PkgComponent.lo Y2CCPkg.lo \
ycpTools.lo PkgModule.lo PkgModuleFunctions.lo Package.lo \
Patch.lo Resolvable.lo Selection.lo Target.lo Source.lo \
- Callbacks.lo
+ Keyring.lo Callbacks.lo
libpy2Pkg_la_OBJECTS = $(am_libpy2Pkg_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -258,6 +258,7 @@
Selection.cc \
Target.cc \
Source.cc \
+ Keyring.cc \
Callbacks.h \
Callbacks.YCP.h \
Callbacks.cc
@@ -343,6 +344,7 @@
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Callbacks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Keyring.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Package.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Patch.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PkgError.Plo@am__quote@
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/src/Package.cc new/yast2-pkg-bindings-2.13.49/src/Package.cc
--- old/yast2-pkg-bindings-2.13.48/src/Package.cc 2006-04-05 17:52:30.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/src/Package.cc 2006-04-06 15:54:25.000000000 +0200
@@ -49,6 +49,7 @@
#include
#include <fstream>
+#include <sstream>
///////////////////////////////////////////////////////////////////
@@ -582,8 +583,12 @@
if (!info.item)
return false;
- bool result = info.item.status().setToBeInstalled(whoWantsIt);
- y2milestone ("DoProvideNameKind %s -> %s\n", name.c_str(), (result ? "Ok" : "Bad"));
+ bool result = info.item.status().setToBeInstalled( whoWantsIt );
+ if (!result) {
+ std::ostringstream os;
+ os << info.item;
+ y2milestone( "DoProvideNameKind failed for %s\n", os.str().c_str() );
+ }
return true;
}
catch (...)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/src/PkgModuleFunctions.h new/yast2-pkg-bindings-2.13.49/src/PkgModuleFunctions.h
--- old/yast2-pkg-bindings-2.13.48/src/PkgModuleFunctions.h 2006-04-05 17:52:30.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/src/PkgModuleFunctions.h 2006-04-06 15:54:25.000000000 +0200
@@ -61,6 +61,8 @@
protected:
zypp::Pathname _target_root;
+
+ std::setstd::string _broken_sources;
zypp::ZYpp::Ptr zypp_pointer;
@@ -203,6 +205,8 @@
YCPValue SourceCreate (const YCPString&, const YCPString&);
/* TYPEINFO: list<integer>(boolean)*/
YCPValue SourceStartCache (const YCPBoolean&);
+ /* TYPEINFO: boolean(void)*/
+ YCPValue SourceCleanupBroken ();
/* TYPEINFO: list<integer>(boolean)*/
YCPValue SourceGetCurrent (const YCPBoolean& enabled);
/* TYPEINFO: boolean(integer)*/
@@ -438,6 +442,10 @@
/* TYPEINFO: boolean()*/
YCPValue ResolvablePreselectPatches ();
+ // keyring related
+ /* TYPEINFO: void(string,boolean)*/
+ YCPValue ImportGPGKey(const YCPString& filename, const YCPBoolean& trusted);
+
/* TYPEINFO: boolean()*/
YCPValue SourceReleaseAll ();
/* TYPEINFO: boolean(string)*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/src/Source.cc new/yast2-pkg-bindings-2.13.49/src/Source.cc
--- old/yast2-pkg-bindings-2.13.48/src/Source.cc 2006-04-05 18:40:00.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/src/Source.cc 2006-04-06 15:54:25.000000000 +0200
@@ -37,6 +37,7 @@
#include
#include
#include
+#include
#include
#include // snprintf
@@ -105,6 +106,7 @@
// FIXME: assuming the sources are already initialized
y2error ("Error in SourceStartManager: %s", excpt.asString().c_str());
_last_error.setLastError(excpt.asUserString());
+ _broken_sources = excpt.aliases();
success = false;
}
catch (const zypp::SourcesAlreadyRestoredException& excpt)
@@ -151,6 +153,38 @@
}
/****************************************************************************************
+ * @builtin SourceCleanupBroken
+ *
+ * @short Clean up all sources that were not properly restored on the last
+ * call of SourceStartManager or SourceStartCache.
+ *
+ * @return boolean
+ **/
+YCPValue
+PkgModuleFunctions::SourceCleanupBroken ()
+{
+ bool success = true;
+
+ zypp::storage::PersistentStorage store;
+ store.init( _target_root );
+
+ for( std::setstd::string::const_iterator it = _broken_sources.begin() ;
+ it != _broken_sources.end() ; ++it )
+ {
+ try {
+ store.deleteSource( *it );
+ } catch( const zypp::Exception& excpt )
+ {
+ success = false;
+ }
+ }
+
+ _broken_sources.clear();
+
+ return YCPBoolean(success);
+}
+
+/****************************************************************************************
* @builtin SourceGetCurrent
*
* @short Return the list of all InstSrc Ids.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.48/src/Target.cc new/yast2-pkg-bindings-2.13.49/src/Target.cc
--- old/yast2-pkg-bindings-2.13.48/src/Target.cc 2006-03-29 19:33:25.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.49/src/Target.cc 2006-04-06 15:54:25.000000000 +0200
@@ -67,6 +67,10 @@
}
_target_root = zypp::Pathname(root->value());
+
+ // we have moved to a different target, the broken source information
+ // is no longer valid
+ _broken_sources.clear();
return YCPBoolean(true);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...