Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Tue Mar 25 11:06:41 CET 2008.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-03-24 20:12:08.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-03-25 10:48:41.221865000 +0100
@@ -1,0 +2,7 @@
+Tue Mar 25 10:33:48 CET 2008 - lslezak@suse.cz
+
+- added Pkg::ResolvableInstallRepo() function - install an object
+ from the specified repository
+- 2.16.21
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.16.20.tar.bz2
New:
----
yast2-pkg-bindings-2.16.21.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.DY3347/_old 2008-03-25 10:57:27.000000000 +0100
+++ /var/tmp/diff_new_pack.DY3347/_new 2008-03-25 10:57:27.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings-devel-doc (Version 2.16.20)
+# spec file for package yast2-pkg-bindings-devel-doc (Version 2.16.21)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 2.16.20
-Release: 3
+Version: 2.16.21
+Release: 1
License: GPL v2 or later
Group: Documentation/HTML
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.16.20.tar.bz2
+Source0: yast2-pkg-bindings-2.16.21.tar.bz2
Prefix: %_prefix
# same as in the main package (because we use the same configure.in.in)
BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen gcc-c++ libgcrypt-devel libxcrypt-devel libxslt libzypp-devel perl-XML-Writer sgml-skel yast2-core-devel yast2-devtools
@@ -38,7 +38,7 @@
Ladislav Slez�k
%prep
-%setup -n yast2-pkg-bindings-2.16.20
+%setup -n yast2-pkg-bindings-2.16.21
# build only documentation, ignore all other directories
echo "doc" > SUBDIRS
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.DY3347/_old 2008-03-25 10:57:27.000000000 +0100
+++ /var/tmp/diff_new_pack.DY3347/_new 2008-03-25 10:57:27.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.16.20)
+# spec file for package yast2-pkg-bindings (Version 2.16.21)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-pkg-bindings
-Version: 2.16.20
-Release: 2
+Version: 2.16.21
+Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.16.20.tar.bz2
+Source0: yast2-pkg-bindings-2.16.21.tar.bz2
Prefix: /usr
BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen gcc-c++ libgcrypt-devel libxcrypt-devel libxslt perl-XML-Writer sgml-skel yast2-core-devel yast2-devtools
BuildRequires: libzypp-devel >= 4.4.0
@@ -40,7 +40,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.16.20
+%setup -n yast2-pkg-bindings-2.16.21
# build only the library, ignore documentation (it is in devel-doc package)
echo "src" > SUBDIRS
@@ -72,6 +72,10 @@
%{_libdir}/YaST2/plugin/libpy2Pkg.so
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog
+* Tue Mar 25 2008 lslezak@suse.cz
+- added Pkg::ResolvableInstallRepo() function - install an object
+ from the specified repository
+- 2.16.21
* Mon Mar 24 2008 coolo@suse.de
- adapt to libzypp 4.6
* Fri Mar 21 2008 lslezak@suse.cz
++++++ yast2-pkg-bindings-2.16.20.tar.bz2 -> yast2-pkg-bindings-2.16.21.tar.bz2 ++++++
++++ 1657 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.16.20/configure.in new/yast2-pkg-bindings-2.16.21/configure.in
--- old/yast2-pkg-bindings-2.16.20/configure.in 2008-02-08 15:34:01.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.21/configure.in 2008-03-25 10:47:41.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2-pkg-bindings
dnl
-dnl -- This file is generated by y2autoconf 2.16.3 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.16.12, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.16.21, http://bugs.opensuse.org/, yast2-pkg-bindings)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.12"
+VERSION="2.16.21"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
@@ -108,7 +108,7 @@
dnl no need for AC_ARG_VAR
AC_PATH_PROG(XGETTEXT, xgettext)
if test -z "$XGETTEXT" ; then
- AC_MSG_ERROR(xgettext is missing; please install gettext-devel.)
+ AC_MSG_ERROR(xgettext is missing; please install gettext-tools.)
fi
Y2DEVTOOLS_PREFIX=`pkg-config --print-errors --variable=prefix yast2-devtools`
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.16.20/src/Package.cc new/yast2-pkg-bindings-2.16.21/src/Package.cc
--- old/yast2-pkg-bindings-2.16.20/src/Package.cc 2008-03-24 19:39:35.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.21/src/Package.cc 2008-03-25 10:03:04.000000000 +0100
@@ -604,11 +604,26 @@
bool
PkgFunctions::DoProvideNameKind( const std::string & name, zypp::Resolvable::Kind kind, zypp::Arch architecture,
- const std::string & version ,const bool onlyNeeded)
+ const std::string & version ,const bool onlyNeeded, int repo_id)
{
try
{
- ProvideProcess info( architecture, version, onlyNeeded);
+ std::string repo_alias;
+
+ if (repo_id >= 0)
+ {
+ YRepo_Ptr repo = logFindRepository(repo_id);
+ if (!repo)
+ {
+ y2warning("Repository %d not found", repo_id);
+ return false;
+ }
+
+ repo_alias = repo->repoInfo().alias();
+ y2milestone("Installing only from repository '%s'", repo_alias.c_str());
+ }
+
+ ProvideProcess info( architecture, version, onlyNeeded, repo_alias);
info.whoWantsIt = whoWantsIt;
invokeOnEach( zypp_ptr()->pool().byIdentBegin( kind, name ),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.16.20/src/PkgFunctions.h new/yast2-pkg-bindings-2.16.21/src/PkgFunctions.h
--- old/yast2-pkg-bindings-2.16.20/src/PkgFunctions.h 2008-03-05 22:03:33.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.21/src/PkgFunctions.h 2008-03-25 10:00:51.000000000 +0100
@@ -104,7 +104,7 @@
std::string yast2zyppType(const std::string &type);
bool DoProvideNameKind( const std::string & name, zypp::Resolvable::Kind kind, zypp::Arch architecture,
- const std::string& version, const bool onlyNeeded = false);
+ const std::string& version, const bool onlyNeeded = false, int repo_id = -1);
bool DoRemoveNameKind( const std::string & name, zypp::Resolvable::Kind kind);
bool DoProvideAllKind(zypp::Resolvable::Kind kind);
bool DoRemoveAllKind(zypp::Resolvable::Kind kind);
@@ -682,6 +682,8 @@
YCPValue ResolvableInstall( const YCPString& name_r, const YCPSymbol& kind_r );
/* TYPEINFO: boolean(string,symbol,string,string)*/
YCPValue ResolvableInstallArchVersion( const YCPString& name_r, const YCPSymbol& kind_r, const YCPString& arch, const YCPString& vers );
+ /* TYPEINFO: boolean(string,symbol,integer)*/
+ YCPValue ResolvableInstallRepo( const YCPString& name_r, const YCPSymbol& kind_r, const YCPInteger& repo_r );
/* TYPEINFO: boolean(string,symbol)*/
YCPValue ResolvableRemove( const YCPString& name_r, const YCPSymbol& kind_r );
/* TYPEINFO: boolean(string,symbol,boolean)*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.16.20/src/ProvideProcess.cc new/yast2-pkg-bindings-2.16.21/src/ProvideProcess.cc
--- old/yast2-pkg-bindings-2.16.20/src/ProvideProcess.cc 2008-02-26 21:41:33.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.21/src/ProvideProcess.cc 2008-03-25 10:06:59.000000000 +0100
@@ -29,8 +29,8 @@
#include "ProvideProcess.h"
#include "log.h"
-ProvideProcess::ProvideProcess(const zypp::Arch &arch, const std::string &vers, const bool oNeeded)
- : _architecture(arch), whoWantsIt(zypp::ResStatus::APPL_HIGH), version(vers), onlyNeeded(oNeeded)
+ProvideProcess::ProvideProcess(const zypp::Arch &arch, const std::string &vers, const bool oNeeded, const std::string &from_repo)
+ : _architecture(arch), whoWantsIt(zypp::ResStatus::APPL_HIGH), version(vers), onlyNeeded(oNeeded), repo_alias(from_repo)
{ }
bool ProvideProcess::operator()( zypp::PoolItem provider )
@@ -47,6 +47,12 @@
return true;
}
+ // a specific repository is requested
+ if (!repo_alias.empty() && provider.resolvable()->repoInfo().alias() != repo_alias)
+ {
+ return true;
+ }
+
if (!provider.status().isInstalled()
&& (!onlyNeeded || provider.status().isNeeded()) ) // take only needed items (e.G. needed patches)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.16.20/src/ProvideProcess.h new/yast2-pkg-bindings-2.16.21/src/ProvideProcess.h
--- old/yast2-pkg-bindings-2.16.20/src/ProvideProcess.h 2008-02-26 21:41:33.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.21/src/ProvideProcess.h 2008-03-25 09:35:31.000000000 +0100
@@ -41,8 +41,9 @@
zypp::ResStatus::TransactByValue whoWantsIt;
std::string version;
bool onlyNeeded;
+ std::string repo_alias;
- ProvideProcess(const zypp::Arch &arch, const std::string &vers, const bool oNeeded);
+ ProvideProcess(const zypp::Arch &arch, const std::string &vers, const bool oNeeded, const std::string &from_repo = "" );
// : _architecture(arch), whoWantsIt(zypp::ResStatus::APPL_HIGH), version(vers), onlyNeeded(oNeeded);
bool operator()( zypp::PoolItem provider );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.16.20/src/Resolvable_Install.cc new/yast2-pkg-bindings-2.16.21/src/Resolvable_Install.cc
--- old/yast2-pkg-bindings-2.16.20/src/Resolvable_Install.cc 2008-02-26 21:41:33.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.21/src/Resolvable_Install.cc 2008-03-25 10:26:19.000000000 +0100
@@ -32,6 +32,7 @@
#include
#include
#include
+#include
#include
@@ -85,6 +86,47 @@
);
}
+/**
+ @builtin ResolvableInstallRepo
+ @short Install all resolvables with selected name, from the specified repository
+ @param name_r name of the resolvable, if empty ("") install all resolvables of the kind
+ @param kind_r kind of resolvable, can be `product, `patch, `package, `selection or `pattern
+ @param repo_r ID of the repository
+ @return boolean false if failed
+*/
+YCPValue
+PkgFunctions::ResolvableInstallRepo( const YCPString& name_r, const YCPSymbol& kind_r, const YCPInteger& repo_r )
+{
+ zypp::Resolvable::Kind kind;
+
+ std::string req_kind = kind_r->symbol ();
+
+ if( req_kind == "product" ) {
+ kind = zypp::ResTraitszypp::Product::kind;
+ }
+ else if ( req_kind == "patch" ) {
+ kind = zypp::ResTraitszypp::Patch::kind;
+ }
+ else if ( req_kind == "package" ) {
+ kind = zypp::ResTraitszypp::Package::kind;
+ }
+ else if ( req_kind == "pattern" ) {
+ kind = zypp::ResTraitszypp::Pattern::kind;
+ }
+ else
+ {
+ y2error("Pkg::ResolvableInstallRepo: unknown symbol: %s", req_kind.c_str());
+ return YCPBoolean(false);
+ }
+
+
+ return YCPBoolean(
+ (name_r->value().empty())
+ ? DoProvideAllKind(kind)
+ : DoProvideNameKind (name_r->value(), kind, zypp::ZConfig::instance().systemArchitecture(), std::string(), false, repo_r->value())
+ );
+}
+
// ------------------------
/**
@builtin ResolvableInstall
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.16.20/VERSION new/yast2-pkg-bindings-2.16.21/VERSION
--- old/yast2-pkg-bindings-2.16.20/VERSION 2008-03-24 19:39:35.000000000 +0100
+++ new/yast2-pkg-bindings-2.16.21/VERSION 2008-03-25 10:34:39.000000000 +0100
@@ -1 +1 @@
-2.16.20
+2.16.21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org