Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Thu Jul 13 11:22:30 CEST 2006.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2006-06-29 09:45:29.000000000 +0200
+++ yast2-pkg-bindings/yast2-pkg-bindings.changes 2006-07-13 10:45:59.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Jul 13 10:05:43 CEST 2006 - lslezak@suse.cz
+
+- new binding Pkg::ResolvableCountPatches() - count available
+ patches which can be installed
+- 2.13.89
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.13.88.tar.bz2
New:
----
yast2-pkg-bindings-2.13.89.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.v0HyPz/_old 2006-07-13 11:21:15.000000000 +0200
+++ /var/tmp/diff_new_pack.v0HyPz/_new 2006-07-13 11:21:15.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.13.88)
+# spec file for package yast2-pkg-bindings (Version 2.13.89)
#
# 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.88
+Version: 2.13.89
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.13.88.tar.bz2
+Source0: yast2-pkg-bindings-2.13.89.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.88
+%setup -n yast2-pkg-bindings-2.13.89
%build
%{prefix}/bin/y2tool y2autoconf
@@ -67,6 +67,10 @@
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog -n yast2-pkg-bindings
+* Thu Jul 13 2006 - lslezak@suse.cz
+- new binding Pkg::ResolvableCountPatches() - count available
+ patches which can be installed
+- 2.13.89
* Thu Jun 29 2006 - lslezak@suse.cz
- ResolvableProperties(): return "is_needed" property of a patch
(#188541)
++++++ yast2-pkg-bindings-2.13.88.tar.bz2 -> yast2-pkg-bindings-2.13.89.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.88/VERSION new/yast2-pkg-bindings-2.13.89/VERSION
--- old/yast2-pkg-bindings-2.13.88/VERSION 2006-06-29 09:28:16.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.89/VERSION 2006-07-12 15:32:56.000000000 +0200
@@ -1 +1 @@
-2.13.88
+2.13.89
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.88/configure new/yast2-pkg-bindings-2.13.89/configure
--- old/yast2-pkg-bindings-2.13.88/configure 2006-06-29 09:36:44.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.89/configure 2006-07-13 10:17:46.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.88.
+# Generated by GNU Autoconf 2.59 for yast2-pkg-bindings 2.13.89.
#
# 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.88'
-PACKAGE_STRING='yast2-pkg-bindings 2.13.88'
+PACKAGE_VERSION='2.13.89'
+PACKAGE_STRING='yast2-pkg-bindings 2.13.89'
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.88 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.13.89 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.88:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.13.89:";;
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.88
+yast2-pkg-bindings configure 2.13.89
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.88, which was
+It was created by yast2-pkg-bindings $as_me 2.13.89, 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.88'
+ VERSION='2.13.89'
cat >>confdefs.h <<_ACEOF
@@ -2139,7 +2139,7 @@
-VERSION="2.13.88"
+VERSION="2.13.89"
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.88, which was
+This file was extended by yast2-pkg-bindings $as_me 2.13.89, 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.88
+yast2-pkg-bindings config.status 2.13.89
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.88/configure.in new/yast2-pkg-bindings-2.13.89/configure.in
--- old/yast2-pkg-bindings-2.13.88/configure.in 2006-06-29 09:36:29.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.89/configure.in 2006-07-13 10:17:33.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.88, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.13.89, 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.88"
+VERSION="2.13.89"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Michael Andres "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.88/src/PkgModuleFunctions.h new/yast2-pkg-bindings-2.13.89/src/PkgModuleFunctions.h
--- old/yast2-pkg-bindings-2.13.88/src/PkgModuleFunctions.h 2006-06-27 16:32:37.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.89/src/PkgModuleFunctions.h 2006-07-12 15:34:37.000000000 +0200
@@ -470,6 +470,8 @@
YCPValue ResolvableDependencies(const YCPString& name, const YCPSymbol& kind_r, const YCPString& version);
/* TYPEINFO: integer(symbol)*/
YCPValue ResolvablePreselectPatches(const YCPSymbol& kind_r);
+ /* TYPEINFO: integer(symbol)*/
+ YCPValue ResolvableCountPatches(const YCPSymbol& kind_r);
// keyring related
/* TYPEINFO: void(string,boolean)*/
@@ -481,6 +483,7 @@
YCPValue SourceMoveDownloadArea (const YCPString & path);
YCPValue ResolvablePropertiesEx(const YCPString& name, const YCPSymbol& kind_r, const YCPString& version, bool dependencies);
+ YCPValue ResolvableSetPatches(const YCPSymbol& kind_r, bool preselect);
/**
* Constructor.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.13.88/src/Resolvable.cc new/yast2-pkg-bindings-2.13.89/src/Resolvable.cc
--- old/yast2-pkg-bindings-2.13.88/src/Resolvable.cc 2006-06-29 09:28:09.000000000 +0200
+++ new/yast2-pkg-bindings-2.13.89/src/Resolvable.cc 2006-07-12 15:34:36.000000000 +0200
@@ -479,8 +479,21 @@
return ret;
}
+/**
+ @builtin ResolvableCountPatches
+ @short Count patches which will be selected by ResolvablePreselectPatches() function
+ @description
+ Only non-optional patches are selected (even when `all parameter is passed!)
+ @param kind_r kind of preselected patches, can be `all, `interactive, `reboot_needed or `affects_pkg_manager
+ @return integer number of preselected patches
+*/
+YCPValue
+PkgModuleFunctions::ResolvableCountPatches (const YCPSymbol& kind_r)
+{
+ // only count the patches
+ return ResolvableSetPatches(kind_r, false);
+}
-// ------------------------
/**
@builtin ResolvablePreselectPatches
@short Preselect patches for auto online update during the installation
@@ -492,6 +505,14 @@
YCPValue
PkgModuleFunctions::ResolvablePreselectPatches (const YCPSymbol& kind_r)
{
+ // preselect the patches
+ return ResolvableSetPatches(kind_r, true);
+}
+
+// helper function
+YCPValue
+PkgModuleFunctions::ResolvableSetPatches (const YCPSymbol& kind_r, bool preselect)
+{
long long selected_patches = 0LL;
std::string kind = kind_r->symbol();
@@ -527,11 +548,15 @@
|| (kind == "reboot_needed" && pch->reboot_needed())
)
{
- stringstream str;
- str << *i << endl;
- y2milestone( "Setting '%s' to transact", str.str().c_str() );
- if (i->status().setTransact(true, whoWantsIt)) // schedule for installation
+ if (!preselect)
+ {
+ selected_patches++;
+ }
+ else if (i->status().setTransact(true, whoWantsIt)) // schedule for installation
{
+ stringstream str;
+ str << *i << endl;
+ y2milestone( "Setting '%s' to transact", str.str().c_str() );
// selected successfully - increase the counter
selected_patches++;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...