Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Tue Aug 12 00:33:51 CEST 2008.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-08-05 15:43:49.000000000 +0200
+++ yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-08-11 11:43:58.639115000 +0200
@@ -1,0 +2,13 @@
+Mon Aug 11 10:22:30 CEST 2008 - lslezak@suse.cz
+
+- added Pkg::SourceForceRefreshNow() - unconditional refresh of
+ a selected repository
+- 2.17.6
+
+-------------------------------------------------------------------
+Thu Aug 7 17:13:38 CEST 2008 - ma@suse.de
+
+- Adapt to new product handling.
+- 2.17.5
+
+-------------------------------------------------------------------
@@ -19 +32 @@
-Wed Jul 23 16:12:56 CEST 2008 ma@suse.de
+Wed Jul 23 16:12:56 CEST 2008 - ma@suse.de
Old:
----
yast2-pkg-bindings-2.17.4.tar.bz2
New:
----
yast2-pkg-bindings-2.17.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.aW7642/_old 2008-08-12 00:32:38.000000000 +0200
+++ /var/tmp/diff_new_pack.aW7642/_new 2008-08-12 00:32:38.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings-devel-doc (Version 2.17.4)
+# spec file for package yast2-pkg-bindings-devel-doc (Version 2.17.6)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 2.17.4
+Version: 2.17.6
Release: 1
License: GPL v2 or later
Group: Documentation/HTML
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.17.4.tar.bz2
+Source0: yast2-pkg-bindings-2.17.6.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
@@ -45,7 +45,7 @@
Ladislav Slez�k
%prep
-%setup -n yast2-pkg-bindings-2.17.4
+%setup -n yast2-pkg-bindings-2.17.6
# build only documentation, ignore all other directories
echo "doc" > SUBDIRS
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.aW7642/_old 2008-08-12 00:32:38.000000000 +0200
+++ /var/tmp/diff_new_pack.aW7642/_new 2008-08-12 00:32:38.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.17.4)
+# spec file for package yast2-pkg-bindings (Version 2.17.6)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-pkg-bindings
-Version: 2.17.4
+Version: 2.17.6
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.17.4.tar.bz2
+Source0: yast2-pkg-bindings-2.17.6.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 >= 5.0.0
@@ -47,7 +47,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.17.4
+%setup -n yast2-pkg-bindings-2.17.6
# build only the library, ignore documentation (it is in devel-doc package)
echo "src" > SUBDIRS
@@ -79,6 +79,13 @@
%{_libdir}/YaST2/plugin/libpy2Pkg.so
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog
+* Mon Aug 11 2008 lslezak@suse.cz
+- added Pkg::SourceForceRefreshNow() - unconditional refresh of
+ a selected repository
+- 2.17.6
+* Thu Aug 07 2008 ma@suse.de
+- Adapt to new product handling.
+- 2.17.5
* Tue Aug 05 2008 lslezak@suse.cz
- fixed searching for the candidate package - prefer better
architecture to better version (bnc#413150)
@@ -87,7 +94,7 @@
- Pkg::Connect() - set LastError() (bnc#280537)
* Wed Jul 30 2008 lslezak@suse.cz
- allow priority >99 in Pkg::SourceSet() (bnc#402135)
- Wed Jul 23 16:12:56 CEST 2008 ma@suse.de
+* Wed Jul 23 2008 ma@suse.de
- Remove references to obsolete freshens dependencies.
- 2.17.3
* Tue Jul 22 2008 coolo@suse.de
++++++ yast2-pkg-bindings-2.17.4.tar.bz2 -> yast2-pkg-bindings-2.17.6.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/configure new/yast2-pkg-bindings-2.17.6/configure
--- old/yast2-pkg-bindings-2.17.4/configure 2008-08-05 15:31:43.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.6/configure 2008-08-11 10:56:24.000000000 +0200
@@ -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.17.4.
+# Generated by GNU Autoconf 2.61 for yast2-pkg-bindings 2.17.6.
#
# 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.17.4'
-PACKAGE_STRING='yast2-pkg-bindings 2.17.4'
+PACKAGE_VERSION='2.17.6'
+PACKAGE_STRING='yast2-pkg-bindings 2.17.6'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1453,7 +1453,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.17.4 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.17.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1524,7 +1524,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-pkg-bindings 2.17.4:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.17.6:";;
esac
cat <<\_ACEOF
@@ -1636,7 +1636,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-pkg-bindings configure 2.17.4
+yast2-pkg-bindings configure 2.17.6
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1650,7 +1650,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.17.4, which was
+It was created by yast2-pkg-bindings $as_me 2.17.6, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2471,7 +2471,7 @@
# Define the identity of the package.
PACKAGE='yast2-pkg-bindings'
- VERSION='2.17.4'
+ VERSION='2.17.6'
cat >>confdefs.h <<_ACEOF
@@ -2699,7 +2699,7 @@
-VERSION="2.17.4"
+VERSION="2.17.6"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
@@ -21700,7 +21700,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.17.4, which was
+This file was extended by yast2-pkg-bindings $as_me 2.17.6, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21753,7 +21753,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-pkg-bindings config.status 2.17.4
+yast2-pkg-bindings config.status 2.17.6
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.17.4/configure.in new/yast2-pkg-bindings-2.17.6/configure.in
--- old/yast2-pkg-bindings-2.17.4/configure.in 2008-08-05 15:31:30.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.6/configure.in 2008-08-11 10:56:11.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.3 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.17.4, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.17.6, 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.17.4"
+VERSION="2.17.6"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Package.cc new/yast2-pkg-bindings-2.17.6/src/Package.cc
--- old/yast2-pkg-bindings-2.17.4/src/Package.cc 2008-08-05 15:38:46.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.6/src/Package.cc 2008-08-11 09:47:14.000000000 +0200
@@ -755,7 +755,7 @@
{
if (tags->value(i)->isString())
{
- DoProvideNameKind (tags->value(i)->asString()->value(), zypp::ResTraitszypp::Package::kind, zypp::ZConfig::instance().systemArchitecture(), "");
+ DoProvideNameKind (tags->value(i)->asString()->value(), zypp::ResKind::package, zypp::ZConfig::instance().systemArchitecture(), "");
}
else
{
@@ -796,7 +796,7 @@
{
if (tags->value(i)->isString())
{
- DoRemoveNameKind( tags->value(i)->asString()->value(), zypp::ResTraitszypp::Package::kind);
+ DoRemoveNameKind( tags->value(i)->asString()->value(), zypp::ResKind::package);
}
else
{
@@ -1323,8 +1323,8 @@
{
try
{
- for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResTraitszypp::Package::kind);
- it != zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Package::kind);
+ for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResKind::package);
+ it != zypp_ptr()->pool().byKindEnd(zypp::ResKind::package);
++it)
{
// return true if there is a package installed/removed by user
@@ -1360,8 +1360,8 @@
try
{
- for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResTraitszypp::Package::kind);
- it != zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Package::kind);
+ for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResKind::package);
+ it != zypp_ptr()->pool().byKindEnd(zypp::ResKind::package);
++it)
{
if (it->status().isToBeUninstalled())
@@ -1397,8 +1397,8 @@
try
{
- for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResTraitszypp::Package::kind);
- it != zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Package::kind);
+ for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResKind::package);
+ it != zypp_ptr()->pool().byKindEnd(zypp::ResKind::package);
++it)
{
if (it->status().isToBeInstalled())
@@ -1466,8 +1466,8 @@
try
{
- for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResTraitszypp::Package::kind);
- it != zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Package::kind);
+ for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResKind::package);
+ it != zypp_ptr()->pool().byKindEnd(zypp::ResKind::package);
++it)
{
// check status and causer
@@ -1517,8 +1517,8 @@
try
{
- for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResTraitszypp::Package::kind);
- it != zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Package::kind);
+ for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResKind::package);
+ it != zypp_ptr()->pool().byKindEnd(zypp::ResKind::package);
++it)
{
if (which == "installed")
@@ -1726,7 +1726,7 @@
// ensure installation of the 'best' architecture
- return YCPBoolean( DoProvideNameKind( name, zypp::ResTraitszypp::Package::kind, zypp::ZConfig::instance().systemArchitecture(), "") );
+ return YCPBoolean( DoProvideNameKind( name, zypp::ResKind::package, zypp::ZConfig::instance().systemArchitecture(), "") );
}
/**
@@ -1746,7 +1746,7 @@
// ensure installation of the 'best' architecture
- return YCPBoolean( DoProvideNameKind( name, zypp::ResTraitszypp::SrcPackage::kind, zypp::ZConfig::instance().systemArchitecture(), "" ) );
+ return YCPBoolean( DoProvideNameKind( name, zypp::ResKind::srcpackage, zypp::ZConfig::instance().systemArchitecture(), "" ) );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/PkgFunctions.h new/yast2-pkg-bindings-2.17.6/src/PkgFunctions.h
--- old/yast2-pkg-bindings-2.17.4/src/PkgFunctions.h 2008-06-19 14:37:19.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.6/src/PkgFunctions.h 2008-08-06 10:13:55.000000000 +0200
@@ -105,6 +105,8 @@
// flag for skipping autorefresh
volatile bool autorefresh_skipped;
+ YCPValue SourceRefreshHelper(const YCPInteger &id, bool forced = false);
+
// conversion methods for type string between Yast and libzypp (for backward compatibility)
std::string zypp2yastType(const std::string &type);
std::string yast2zyppType(const std::string &type);
@@ -141,7 +143,8 @@
void CallInitDownload(const std::string &task);
void CallDestDownload();
void RefreshWithCallbacks(const zypp::RepoInfo &repo,
- const zypp::ProgressData::ReceiverFnc & progressrcv = zypp::ProgressData::ReceiverFnc());
+ const zypp::ProgressData::ReceiverFnc & progressrcv = zypp::ProgressData::ReceiverFnc(),
+ zypp::RepoManager::RawMetadataRefreshPolicy refresh = zypp::RepoManager::RefreshIfNeeded);
zypp::repo::RepoType ProbeWithCallbacks(const zypp::Url &url);
void ScanProductsWithCallBacks(const zypp::Url &url);
void CallRefreshStarted();
@@ -485,6 +488,8 @@
/* TYPEINFO: boolean(integer)*/
YCPValue SourceRefreshNow (const YCPInteger&);
/* TYPEINFO: boolean(integer)*/
+ YCPValue SourceForceRefreshNow (const YCPInteger&);
+ /* TYPEINFO: boolean(integer)*/
YCPValue SourceDelete (const YCPInteger&);
/* TYPEINFO: void(integer)*/
YCPValue SourceRaisePriority (const YCPInteger&);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Resolvable_Install.cc new/yast2-pkg-bindings-2.17.6/src/Resolvable_Install.cc
--- old/yast2-pkg-bindings-2.17.4/src/Resolvable_Install.cc 2008-03-27 15:14:20.000000000 +0100
+++ new/yast2-pkg-bindings-2.17.6/src/Resolvable_Install.cc 2008-08-11 09:47:14.000000000 +0200
@@ -60,16 +60,16 @@
zypp::Arch architecture(arch_str);
if( req_kind == "product" ) {
- kind = zypp::ResTraitszypp::Product::kind;
+ kind = zypp::ResKind::product;
}
else if ( req_kind == "patch" ) {
- kind = zypp::ResTraitszypp::Patch::kind;
+ kind = zypp::ResKind::patch;
}
else if ( req_kind == "package" ) {
- kind = zypp::ResTraitszypp::Package::kind;
+ kind = zypp::ResKind::package;
}
else if ( req_kind == "pattern" ) {
- kind = zypp::ResTraitszypp::Pattern::kind;
+ kind = zypp::ResKind::pattern;
}
else
{
@@ -102,16 +102,16 @@
std::string req_kind = kind_r->symbol ();
if( req_kind == "product" ) {
- kind = zypp::ResTraitszypp::Product::kind;
+ kind = zypp::ResKind::product;
}
else if ( req_kind == "patch" ) {
- kind = zypp::ResTraitszypp::Patch::kind;
+ kind = zypp::ResKind::patch;
}
else if ( req_kind == "package" ) {
- kind = zypp::ResTraitszypp::Package::kind;
+ kind = zypp::ResKind::package;
}
else if ( req_kind == "pattern" ) {
- kind = zypp::ResTraitszypp::Pattern::kind;
+ kind = zypp::ResKind::pattern;
}
else
{
@@ -157,16 +157,16 @@
std::string req_kind = kind_r->symbol ();
if( req_kind == "product" ) {
- kind = zypp::ResTraitszypp::Product::kind;
+ kind = zypp::ResKind::product;
}
else if ( req_kind == "patch" ) {
- kind = zypp::ResTraitszypp::Patch::kind;
+ kind = zypp::ResKind::patch;
}
else if ( req_kind == "package" ) {
- kind = zypp::ResTraitszypp::Package::kind;
+ kind = zypp::ResKind::package;
}
else if ( req_kind == "pattern" ) {
- kind = zypp::ResTraitszypp::Pattern::kind;
+ kind = zypp::ResKind::pattern;
}
else
{
@@ -200,16 +200,16 @@
bool force = force_r->value();
if( req_kind == "product" ) {
- kind = zypp::ResTraitszypp::Product::kind;
+ kind = zypp::ResKind::product;
}
else if ( req_kind == "patch" ) {
- kind = zypp::ResTraitszypp::Patch::kind;
+ kind = zypp::ResKind::patch;
}
else if ( req_kind == "package" ) {
- kind = zypp::ResTraitszypp::Package::kind;
+ kind = zypp::ResKind::package;
}
else if ( req_kind == "pattern" ) {
- kind = zypp::ResTraitszypp::Pattern::kind;
+ kind = zypp::ResKind::pattern;
}
else
{
@@ -266,16 +266,16 @@
std::string name = name_r->value();
if( req_kind == "product" ) {
- kind = zypp::ResTraitszypp::Product::kind;
+ kind = zypp::ResKind::product;
}
else if ( req_kind == "patch" ) {
- kind = zypp::ResTraitszypp::Patch::kind;
+ kind = zypp::ResKind::patch;
}
else if ( req_kind == "package" ) {
- kind = zypp::ResTraitszypp::Package::kind;
+ kind = zypp::ResKind::package;
}
else if ( req_kind == "pattern" ) {
- kind = zypp::ResTraitszypp::Pattern::kind;
+ kind = zypp::ResKind::pattern;
}
else
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Resolvable_Properties.cc new/yast2-pkg-bindings-2.17.6/src/Resolvable_Properties.cc
--- old/yast2-pkg-bindings-2.17.4/src/Resolvable_Properties.cc 2008-07-29 07:07:30.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.6/src/Resolvable_Properties.cc 2008-08-11 10:08:47.000000000 +0200
@@ -107,24 +107,16 @@
YCPList ret;
if( req_kind == "product" ) {
- kind = zypp::ResTraitszypp::Product::kind;
-/*
- zypp::ResPool pool( zypp::ResPool::instance() );
-
- for_( it, pool.satisfiedProductsBegin(), pool.satisfiedProductsEnd() )
- {
- zypp::Product_constPtr p( asKind<Product>(*it) );
- }
-*/
+ kind = zypp::ResKind::product;
}
else if ( req_kind == "patch" ) {
- kind = zypp::ResTraitszypp::Patch::kind;
+ kind = zypp::ResKind::patch;
}
else if ( req_kind == "package" ) {
- kind = zypp::ResTraitszypp::Package::kind;
+ kind = zypp::ResKind::package;
}
else if ( req_kind == "pattern" ) {
- kind = zypp::ResTraitszypp::Pattern::kind;
+ kind = zypp::ResKind::pattern;
}
else if ( req_kind == "language" )
{
@@ -410,16 +402,16 @@
std::string stat_str = status->symbol();
if( req_kind == "product" ) {
- kind = zypp::ResTraitszypp::Product::kind;
+ kind = zypp::ResKind::product;
}
else if ( req_kind == "patch" ) {
- kind = zypp::ResTraitszypp::Patch::kind;
+ kind = zypp::ResKind::patch;
}
else if ( req_kind == "package" ) {
- kind = zypp::ResTraitszypp::Package::kind;
+ kind = zypp::ResKind::package;
}
else if ( req_kind == "pattern" ) {
- kind = zypp::ResTraitszypp::Pattern::kind;
+ kind = zypp::ResKind::pattern;
}
else if ( req_kind == "any" ) {
try
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Selection.cc new/yast2-pkg-bindings-2.17.6/src/Selection.cc
--- old/yast2-pkg-bindings-2.17.4/src/Selection.cc 2008-02-18 13:44:34.000000000 +0100
+++ new/yast2-pkg-bindings-2.17.6/src/Selection.cc 2008-08-11 09:47:14.000000000 +0200
@@ -35,7 +35,6 @@
#include
#include
-#include
#include
using std::string;
@@ -110,9 +109,9 @@
try
{
- for (zypp::ResPool::byKind_iterator it
- = zypp_ptr()->pool().byKindBegin(zypp::ResTraitszypp::Pattern::kind);
- it != zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Pattern::kind) ; ++it )
+ for (zypp::ResPool::byKind_iterator it
+ = zypp_ptr()->pool().byKindBegin(zypp::ResKind::pattern);
+ it != zypp_ptr()->pool().byKindEnd(zypp::ResKind::pattern) ; ++it )
{
std::string pattern;
@@ -209,7 +208,7 @@
if ( it != zypp_ptr()->pool().byIdentEndzypp::Pattern(name) )
{
- zypp::Pattern::constPtr pattern =
+ zypp::Pattern::constPtr pattern =
zypp::dynamic_pointer_cast<const zypp::Pattern>(it->resolvable ());
// pattern found
@@ -347,7 +346,7 @@
@short Activate all selected selections - obsoleted, use PkgSolve() instead
@return boolean true
-
+
@deprecated Use Pkg::PkgSolve instead, selections are solvable now
*/
YCPBoolean
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Source_Callbacks.cc new/yast2-pkg-bindings-2.17.6/src/Source_Callbacks.cc
--- old/yast2-pkg-bindings-2.17.4/src/Source_Callbacks.cc 2008-03-03 14:39:19.000000000 +0100
+++ new/yast2-pkg-bindings-2.17.6/src/Source_Callbacks.cc 2008-08-11 10:56:03.000000000 +0200
@@ -19,7 +19,7 @@
*/
/*
- File: $Id: Source_Callbacks.cc 43261 2008-01-03 15:05:57Z lslezak $
+ File: $Id: Source_Callbacks.cc 49913 2008-08-11 08:56:03Z lslezak $
Author: Ladislav Slezák
Summary: Callbacks functions related to repository registration
Namespace: Pkg
@@ -124,14 +124,14 @@
}
// this method should be used instead of RepoManager::refreshMetadata()
-void PkgFunctions::RefreshWithCallbacks(const zypp::RepoInfo &repo, const zypp::ProgressData::ReceiverFnc &progressrcv)
+void PkgFunctions::RefreshWithCallbacks(const zypp::RepoInfo &repo, const zypp::ProgressData::ReceiverFnc &progressrcv, zypp::RepoManager::RawMetadataRefreshPolicy refresh)
{
CallInitDownload(std::string(_("Refreshing repository ") + repo.alias()));
try
{
zypp::RepoManager repomanager = CreateRepoManager();
- repomanager.refreshMetadata(repo, zypp::RepoManager::RefreshIfNeeded, progressrcv);
+ repomanager.refreshMetadata(repo, refresh, progressrcv);
}
catch(...)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Source_Download.cc new/yast2-pkg-bindings-2.17.6/src/Source_Download.cc
--- old/yast2-pkg-bindings-2.17.4/src/Source_Download.cc 2008-01-03 16:05:59.000000000 +0100
+++ new/yast2-pkg-bindings-2.17.6/src/Source_Download.cc 2008-08-11 10:56:03.000000000 +0200
@@ -19,7 +19,7 @@
*/
/*
- File: $Id: Source_Download.cc 43261 2008-01-03 15:05:57Z lslezak $
+ File: $Id: Source_Download.cc 49913 2008-08-11 08:56:03Z lslezak $
Author: Ladislav Slezák
Summary: Functions for downloading files from a repository
Namespace: Pkg
@@ -218,20 +218,12 @@
}
-/****************************************************************************************
- * @builtin SourceRefreshNow
- * @short Attempt to immediately refresh a Source
- * @description
- * The InsrSrc will be encouraged to check and refresh all metadata
- * cached on disk.
- *
- * @param integer SrcId Specifies the InstSrc.
- *
- * @return boolean
- **/
+
YCPValue
-PkgFunctions::SourceRefreshNow (const YCPInteger& id)
+PkgFunctions::SourceRefreshHelper (const YCPInteger& id, bool forced)
{
+ y2milestone("Forced refresh : %s", forced ? "true" : "false");
+
YRepo_Ptr repo = logFindRepository(id->value());
if (!repo)
return YCPBoolean(false);
@@ -254,14 +246,14 @@
{
zypp::RepoManager repomanager = CreateRepoManager();
y2milestone("Refreshing metadata '%s'", repo->repoInfo().alias().c_str());
- RefreshWithCallbacks(repo->repoInfo());
+ RefreshWithCallbacks(repo->repoInfo(), zypp::ProgressData::ReceiverFnc(), forced ? zypp::RepoManager::RefreshForced : zypp::RepoManager::RefreshIfNeeded);
// next stage, increase progress
prog_total.incr();
pkgprogress.NextStage();
y2milestone("Caching source '%s'...", repo->repoInfo().alias().c_str());
- repomanager.buildCache(repo->repoInfo());
+ repomanager.buildCache(repo->repoInfo(), forced ? zypp::RepoManager::BuildForced : zypp::RepoManager::BuildIfNeeded);
}
catch ( const zypp::Exception & expt )
{
@@ -275,3 +267,37 @@
return YCPBoolean( true );
}
+/****************************************************************************************
+ * @builtin SourceRefreshNow
+ * @short Attempt to immediately refresh a Source
+ * @description
+ * The InsrSrc will be encouraged to check and refresh all metadata
+ * cached on disk.
+ *
+ * @param integer SrcId Specifies the InstSrc.
+ *
+ * @return boolean
+ **/
+YCPValue
+PkgFunctions::SourceRefreshNow (const YCPInteger& id)
+{
+ // refresh if needed
+ return SourceRefreshHelper(id);
+}
+
+/****************************************************************************************
+ * @builtin SourceForceRefreshNow
+ * @short Unconditionally refresh a Source
+ * @description
+ * Downloads repository metadata and rebuilds the cache
+ *
+ * @param integer SrcId Specifies the InstSrc.
+ *
+ * @return boolean
+ **/
+YCPValue
+PkgFunctions::SourceForceRefreshNow (const YCPInteger& id)
+{
+ // force refresh
+ return SourceRefreshHelper(id, true);
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Source_Get.cc new/yast2-pkg-bindings-2.17.6/src/Source_Get.cc
--- old/yast2-pkg-bindings-2.17.4/src/Source_Get.cc 2008-03-27 11:40:47.000000000 +0100
+++ new/yast2-pkg-bindings-2.17.6/src/Source_Get.cc 2008-08-11 09:47:14.000000000 +0200
@@ -19,7 +19,7 @@
*/
/*
- File: $Id: Source_Get.cc 45782 2008-03-27 10:40:46Z lslezak $
+ File: $Id: Source_Get.cc 49835 2008-08-07 15:15:02Z mlandres $
Author: Ladislav Slezák
Summary: Functions for reading repository properties
Namespace: Pkg
@@ -279,9 +279,9 @@
try
{
// find a product for the given source
- zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResTraitszypp::Product::kind);
+ zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(zypp::ResKind::product);
- for( ; it != zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Product::kind) ; ++it)
+ for( ; it != zypp_ptr()->pool().byKindEnd(zypp::ResKind::product) ; ++it)
{
zypp::Product::constPtr product = boost::dynamic_pointer_cast<const zypp::Product>( it->resolvable() );
@@ -304,7 +304,7 @@
}
}
- if( it == zypp_ptr()->pool().byKindEnd(zypp::ResTraitszypp::Product::kind) )
+ if( it == zypp_ptr()->pool().byKindEnd(zypp::ResKind::product) )
{
y2error ("Product for source '%lld' not found", src_id->value());
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/src/Target.cc new/yast2-pkg-bindings-2.17.6/src/Target.cc
--- old/yast2-pkg-bindings-2.17.4/src/Target.cc 2008-04-15 15:40:57.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.6/src/Target.cc 2008-08-11 09:47:14.000000000 +0200
@@ -184,8 +184,10 @@
{
zypp::ResPool pool( zypp::ResPool::instance() ); // ResPool is a global singleton
- for_( it, pool.satisfiedProductsBegin(), pool.satisfiedProductsEnd() )
+ for_( it, pool.byKindBeginzypp::Product(), pool.byKindEndzypp::Product() )
{
+ if ( ! it->status().isInstalled() )
+ continue;
zypp::Product::constPtr product = asKindzypp::Product( it->resolvable() );
#warning TargetProducts does not return all keys
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.17.4/VERSION new/yast2-pkg-bindings-2.17.6/VERSION
--- old/yast2-pkg-bindings-2.17.4/VERSION 2008-08-05 14:57:21.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.6/VERSION 2008-08-11 10:55:54.000000000 +0200
@@ -1 +1 @@
-2.17.4
+2.17.6
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org