Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Sun Jun 22 09:21:43 CEST 2008.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-05-30 09:46:20.000000000 +0200
+++ yast2-pkg-bindings/yast2-pkg-bindings.changes 2008-06-17 14:55:16.682081000 +0200
@@ -1,0 +2,26 @@
+Tue Jun 17 14:24:15 CEST 2008 - lslezak@suse.cz
+
+- do not save sources in Pkg::SourceFinishAll() (use
+ Pkg::SourceSaveAll() for that), just clean the known repositories
+ and allow new source initialization (bnc#395738)
+- 2.17.0
+
+-------------------------------------------------------------------
+Mon Jun 16 17:36:44 CEST 2008 - lslezak@suse.cz
+
+- added architecture related functions, needed for fate#301883
+ (Pkg::GetArchitecture(), Pkg::SetArchitecture() and
+ Pkg::SystemArchitecture())
+
+-------------------------------------------------------------------
+Fri Jun 13 14:06:21 CEST 2008 - lslezak@suse.cz
+
+- removed targetFinish() call in the destructor, it's not needed
+ anymore (bnc#381917)
+
+-------------------------------------------------------------------
+Thu Jun 12 12:25:49 CEST 2008 - lslezak@suse.cz
+
+- Fixed tag in the help text (bnc#386076)
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.16.39.tar.bz2
New:
----
yast2-pkg-bindings-2.17.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.S30737/_old 2008-06-22 09:18:22.000000000 +0200
+++ /var/tmp/diff_new_pack.S30737/_new 2008-06-22 09:18:22.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings-devel-doc (Version 2.16.39)
+# spec file for package yast2-pkg-bindings-devel-doc (Version 2.17.0)
#
# 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.39
+Version: 2.17.0
Release: 1
License: GPL v2 or later
Group: Documentation/HTML
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.16.39.tar.bz2
+Source0: yast2-pkg-bindings-2.17.0.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.39
+%setup -n yast2-pkg-bindings-2.17.0
# build only documentation, ignore all other directories
echo "doc" > SUBDIRS
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.S30737/_old 2008-06-22 09:18:22.000000000 +0200
+++ /var/tmp/diff_new_pack.S30737/_new 2008-06-22 09:18:22.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.16.39)
+# spec file for package yast2-pkg-bindings (Version 2.17.0)
#
# 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.39
+Version: 2.17.0
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.16.39.tar.bz2
+Source0: yast2-pkg-bindings-2.17.0.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.25.1
@@ -40,7 +40,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.16.39
+%setup -n yast2-pkg-bindings-2.17.0
# build only the library, ignore documentation (it is in devel-doc package)
echo "src" > SUBDIRS
@@ -72,6 +72,20 @@
%{_libdir}/YaST2/plugin/libpy2Pkg.so
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog
+* Tue Jun 17 2008 lslezak@suse.cz
+- do not save sources in Pkg::SourceFinishAll() (use
+ Pkg::SourceSaveAll() for that), just clean the known repositories
+ and allow new source initialization (bnc#395738)
+- 2.17.0
+* Mon Jun 16 2008 lslezak@suse.cz
+- added architecture related functions, needed for fate#301883
+ (Pkg::GetArchitecture(), Pkg::SetArchitecture() and
+ Pkg::SystemArchitecture())
+* Fri Jun 13 2008 lslezak@suse.cz
+- removed targetFinish() call in the destructor, it's not needed
+ anymore (bnc#381917)
+* Thu Jun 12 2008 lslezak@suse.cz
+- Fixed tag in the help text (bnc#386076)
* Thu May 29 2008 lslezak@suse.cz
- set the prefix for package cache (do not download packages to
the current directory) (bnc#394728)
++++++ yast2-pkg-bindings-2.16.39.tar.bz2 -> yast2-pkg-bindings-2.17.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/configure new/yast2-pkg-bindings-2.17.0/configure
--- old/yast2-pkg-bindings-2.16.39/configure 2008-05-23 12:54:01.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/configure 2008-06-17 14:45:29.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.16.37.
+# Generated by GNU Autoconf 2.61 for yast2-pkg-bindings 2.17.0.
#
# 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.37'
-PACKAGE_STRING='yast2-pkg-bindings 2.16.37'
+PACKAGE_VERSION='2.17.0'
+PACKAGE_STRING='yast2-pkg-bindings 2.17.0'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1449,7 +1449,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.37 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.17.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1520,7 +1520,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-pkg-bindings 2.16.37:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.17.0:";;
esac
cat <<\_ACEOF
@@ -1629,7 +1629,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-pkg-bindings configure 2.16.37
+yast2-pkg-bindings configure 2.17.0
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1643,7 +1643,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.37, which was
+It was created by yast2-pkg-bindings $as_me 2.17.0, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2464,7 +2464,7 @@
# Define the identity of the package.
PACKAGE='yast2-pkg-bindings'
- VERSION='2.16.37'
+ VERSION='2.17.0'
cat >>confdefs.h <<_ACEOF
@@ -2692,7 +2692,7 @@
-VERSION="2.16.37"
+VERSION="2.17.0"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
@@ -21574,7 +21574,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.37, which was
+This file was extended by yast2-pkg-bindings $as_me 2.17.0, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21627,7 +21627,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-pkg-bindings config.status 2.16.37
+yast2-pkg-bindings config.status 2.17.0
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.39/configure.in new/yast2-pkg-bindings-2.17.0/configure.in
--- old/yast2-pkg-bindings-2.16.39/configure.in 2008-05-23 12:53:48.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/configure.in 2008-06-17 14:45:15.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-pkg-bindings
dnl
-dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.16.37, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.17.0, 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.37"
+VERSION="2.17.0"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/Arch.cc new/yast2-pkg-bindings-2.17.0/src/Arch.cc
--- old/yast2-pkg-bindings-2.16.39/src/Arch.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pkg-bindings-2.17.0/src/Arch.cc 2008-06-16 16:48:18.000000000 +0200
@@ -0,0 +1,98 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2008 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/*
+ File: $Id$
+ Author: Ladislav Slezák
+ Namespace: Pkg
+ Summary: Functions for configuring system architecture
+*/
+
+#include "PkgFunctions.h"
+#include "log.h"
+
+#include <string>
+
+#include
+#include
+
+#include
+
+
+/**
+ * @builtin GetArchitecture
+ * @short Get the current architecture
+ * @description Returns the current architecture used by the package manager
+ * @return string architecture
+ */
+YCPValue
+PkgFunctions::GetArchitecture()
+{
+ std::string arch(zypp::ZConfig::instance().systemArchitecture().asString());
+
+ y2milestone("Current system architecture: %s", arch.c_str());
+ return YCPString(arch);
+}
+
+/**
+ * @builtin SetArchitecture
+ * @short
+ * @description Change the architecture. The package manager (libzypp)
+ * does not expect that the system architecture will change at runtime.
+ * It should be set as soon as possible before using other commands.
+ * @param string architecture the new architecture, e.g. "i386", "ppc", "s390x"...
+ * @return boolean true on success
+ */
+YCPValue
+PkgFunctions::SetArchitecture(const YCPString &architecture)
+{
+ std::string arch(architecture->value());
+
+ try
+ {
+ y2warning("Switching architecture to: %s", arch.c_str());
+ zypp::Arch new_arch(arch);
+ zypp::ZConfig::instance().setSystemArchitecture(new_arch);
+ }
+ catch (const zypp::Exception& excpt)
+ {
+ y2error("Switching to architecture %s failed: %s", arch.c_str(), excpt.asString().c_str());
+ _last_error.setLastError(ExceptionAsString(excpt));
+ return YCPBoolean(false);
+ }
+
+ return YCPBoolean(true);
+}
+
+/**
+ * @builtin SystemArchitecture
+ * @short
+ * @description
+ * @return string default system architecture for the system
+ */
+YCPValue
+PkgFunctions::SystemArchitecture()
+{
+ std::string def_arch(zypp::ZConfig::defaultSystemArchitecture().asString());
+ y2milestone("Default system architecture: %s", def_arch.c_str());
+
+ return YCPString(def_arch);
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/HelpTexts.h new/yast2-pkg-bindings-2.17.0/src/HelpTexts.h
--- old/yast2-pkg-bindings-2.16.39/src/HelpTexts.h 2008-05-05 16:33:00.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/src/HelpTexts.h 2008-06-12 12:25:15.000000000 +0200
@@ -39,7 +39,7 @@
// help text
- static const char *load_target = _("<P><BIG><B>Loading Installed Packages</B><BIG></P>"
+ static const char *load_target = _("<P><BIG><B>Loading Installed Packages</B></BIG></P>"
"<P>The package manager is reading installed packages...</P>");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/Makefile.am new/yast2-pkg-bindings-2.17.0/src/Makefile.am
--- old/yast2-pkg-bindings-2.16.39/src/Makefile.am 2008-05-07 12:36:11.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/src/Makefile.am 2008-06-16 15:45:25.000000000 +0200
@@ -17,6 +17,7 @@
plugin_LTLIBRARIES = libpy2Pkg.la
libpy2Pkg_la_SOURCES = \
+ Arch.cc \
PkgError.cc PkgError.h \
Y2PkgComponent.cc Y2PkgComponent.h \
Y2CCPkg.cc Y2CCPkg.h \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/Makefile.in new/yast2-pkg-bindings-2.17.0/src/Makefile.in
--- old/yast2-pkg-bindings-2.16.39/src/Makefile.in 2008-05-23 12:54:04.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/src/Makefile.in 2008-06-17 14:45:33.000000000 +0200
@@ -57,17 +57,17 @@
LTLIBRARIES = $(plugin_LTLIBRARIES)
am__DEPENDENCIES_1 =
libpy2Pkg_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libpy2Pkg_la_OBJECTS = PkgError.lo Y2PkgComponent.lo Y2CCPkg.lo \
- ycpTools.lo PkgModule.lo PkgProgress.lo ProvideProcess.lo \
- PkgModuleFunctions.lo PkgFunctions.lo Package.lo Patch.lo \
- Resolvable_Install.lo Resolvable_Patches.lo \
- Resolvable_Properties.lo Selection.lo Target.lo Target_DU.lo \
- Target_Load.lo Locale.lo Locks.lo Source_Callbacks.lo \
- Source_Create.lo Source_Download.lo Source_Get.lo \
- Source_Installation.lo Source_Load.lo Source_Misc.lo \
- Source_Resolvables.lo Source_Save.lo Source_Set.lo Keyring.lo \
- GPGMap.lo Callbacks.YCP.lo Callbacks.lo Callbacks_Register.lo \
- Y2PkgFunction.lo YRepo.lo
+am_libpy2Pkg_la_OBJECTS = Arch.lo PkgError.lo Y2PkgComponent.lo \
+ Y2CCPkg.lo ycpTools.lo PkgModule.lo PkgProgress.lo \
+ ProvideProcess.lo PkgModuleFunctions.lo PkgFunctions.lo \
+ Package.lo Patch.lo Resolvable_Install.lo \
+ Resolvable_Patches.lo Resolvable_Properties.lo Selection.lo \
+ Target.lo Target_DU.lo Target_Load.lo Locale.lo Locks.lo \
+ Source_Callbacks.lo Source_Create.lo Source_Download.lo \
+ Source_Get.lo Source_Installation.lo Source_Load.lo \
+ Source_Misc.lo Source_Resolvables.lo Source_Save.lo \
+ Source_Set.lo Keyring.lo GPGMap.lo Callbacks.YCP.lo \
+ Callbacks.lo Callbacks_Register.lo Y2PkgFunction.lo YRepo.lo
libpy2Pkg_la_OBJECTS = $(am_libpy2Pkg_la_OBJECTS)
libpy2Pkg_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
@@ -265,6 +265,7 @@
AM_LDFLAGS = -L${libdir}
plugin_LTLIBRARIES = libpy2Pkg.la
libpy2Pkg_la_SOURCES = \
+ Arch.cc \
PkgError.cc PkgError.h \
Y2PkgComponent.cc Y2PkgComponent.h \
Y2CCPkg.cc Y2CCPkg.h \
@@ -381,6 +382,7 @@
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Arch.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Callbacks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Callbacks.YCP.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Callbacks_Register.Plo@am__quote@
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/PkgFunctions.cc new/yast2-pkg-bindings-2.17.0/src/PkgFunctions.cc
--- old/yast2-pkg-bindings-2.16.39/src/PkgFunctions.cc 2008-05-29 10:34:01.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/src/PkgFunctions.cc 2008-06-13 10:38:26.000000000 +0200
@@ -120,16 +120,6 @@
if (zypp_pointer != NULL)
{
- try
- {
- y2milestone("Finishing the target");
- zypp_pointer->finishTarget();
- }
- catch(...)
- {
- y2error("finishTarget() has failed");
- }
-
y2milestone("Releasing the zypp pointer...");
zypp_pointer = NULL;
y2milestone("Zypp pointer released");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/PkgFunctions.h new/yast2-pkg-bindings-2.17.0/src/PkgFunctions.h
--- old/yast2-pkg-bindings-2.16.39/src/PkgFunctions.h 2008-05-14 16:50:45.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/src/PkgFunctions.h 2008-06-16 15:50:52.000000000 +0200
@@ -688,6 +688,14 @@
/* TYPEINFO: boolean(string)*/
YCPBoolean RpmChecksig( const YCPString & filename );
+ // architecture related
+ /* TYPEINFO: string()*/
+ YCPValue GetArchitecture();
+ /* TYPEINFO: boolean(string)*/
+ YCPValue SetArchitecture(const YCPString &architecture);
+ /* TYPEINFO: string()*/
+ YCPValue SystemArchitecture();
+
// you patch related
/* TYPEINFO: map()*/
YCPValue YouStatus ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/Source_Resolvables.cc new/yast2-pkg-bindings-2.17.0/src/Source_Resolvables.cc
--- old/yast2-pkg-bindings-2.16.39/src/Source_Resolvables.cc 2008-04-17 13:13:01.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/src/Source_Resolvables.cc 2008-06-17 14:44:14.000000000 +0200
@@ -19,7 +19,7 @@
*/
/*
- File: $Id: Source_Resolvables.cc 46780 2008-04-17 11:03:08Z schubi2 $
+ File: $Id: Source_Resolvables.cc 48353 2008-06-17 12:44:13Z lslezak $
Author: Ladislav Slezák
Summary: Functions for adding/removing resolvables in the pool
Namespace: Pkg
@@ -42,6 +42,7 @@
*/
void PkgFunctions::RemoveResolvablesFrom(const std::string &alias)
{
+ y2milestone("Removing resolvables from '%s'", alias.c_str());
// remove the resolvables if they have been loaded
zypp::sat::Pool::instance().reposErase(alias);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/src/Source_Save.cc new/yast2-pkg-bindings-2.17.0/src/Source_Save.cc
--- old/yast2-pkg-bindings-2.16.39/src/Source_Save.cc 2008-01-03 16:05:59.000000000 +0100
+++ new/yast2-pkg-bindings-2.17.0/src/Source_Save.cc 2008-06-17 14:44:14.000000000 +0200
@@ -19,7 +19,7 @@
*/
/*
- File: $Id: Source_Save.cc 43261 2008-01-03 15:05:57Z lslezak $
+ File: $Id: Source_Save.cc 48353 2008-06-17 12:44:13Z lslezak $
Author: Ladislav Slezák
Summary: Functions for saving repository configuration
Namespace: Pkg
@@ -223,43 +223,29 @@
/****************************************************************************************
* @builtin SourceFinishAll
*
- * @short Save and then disable all InstSrces.
+ * @short Release all instalation sources
* @description
- * If there are no enabled sources, do nothing
- * (idempotence hack, broken design: #155459, #176013, use SourceSaveAll).
- * @return boolean
+ * Release all known installation repositories. Releasing is done automaticaly in Pkg::
+ * destructor, but can be done explicitly to force reloading of registered repositories.
+ * Use SourceSaveAll() to not loose the new registered sources before calling SourceFinishAll()!
+ * @return boolean true on success
**/
YCPValue
PkgFunctions::SourceFinishAll ()
{
try
{
- bool found_enabled = false;
- for (RepoCont::iterator it = repos.begin();
- it != repos.end(); ++it)
- {
- if ((*it)->repoInfo().enabled() && !(*it)->isDeleted())
- {
- found_enabled = true;
- break;
- }
- }
-
- if (!found_enabled)
- {
- y2milestone( "No enabled sources, skipping SourceFinishAll()" );
- return YCPBoolean( true );
- }
-
- SourceSaveAll();
+ y2milestone( "Unregistering all sources...") ;
- y2milestone( "Disabling all sources...") ;
+ // remove all resolvables
for (RepoCont::iterator it = repos.begin();
it != repos.end(); ++it)
{
- (*it)->repoInfo().setEnabled(false);
+ RemoveResolvablesFrom((*it)->repoInfo().alias());
}
- // TODO FIXME remove all resolvables??
+
+ // release all repositories
+ repos.clear();
}
catch (zypp::Exception & excpt)
{
@@ -268,7 +254,7 @@
return YCPBoolean(false);
}
- y2milestone("All sources have been saved and disabled");
+ y2milestone("All sources have been unregistered");
return YCPBoolean(true);
}
@@ -276,13 +262,14 @@
/****************************************************************************************
* @builtin SourceFinish
- * @short Disable an Installation Source
+ * @short Disable an Installation Source - obsoleted
* @param integer SrcId Specifies the InstSrc.
* @return boolean
**/
YCPValue
PkgFunctions::SourceFinish (const YCPInteger& id)
{
+ y2warning("Pkg::SourceFinish() is obsoleted, use Pkg::SourceSetEnabled(id, false) instead");
return SourceSetEnabled(id, false);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.16.39/VERSION new/yast2-pkg-bindings-2.17.0/VERSION
--- old/yast2-pkg-bindings-2.16.39/VERSION 2008-05-29 14:08:47.000000000 +0200
+++ new/yast2-pkg-bindings-2.17.0/VERSION 2008-06-17 14:44:58.000000000 +0200
@@ -1 +1 @@
-2.16.39
+2.17.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org