Hello community,
here is the log from the commit of package yast2-backup
checked in at Thu Dec 7 19:52:59 CET 2006.
--------
--- yast2-backup/yast2-backup.changes 2006-11-07 16:58:57.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-backup/yast2-backup.changes 2006-12-04 10:18:16.000000000 +0100
@@ -1,0 +2,8 @@
+Mon Dec 4 09:27:07 CET 2006 - locilka@suse.cz
+
+- Calling client backup_get_packages via .target.bash_output
+ instead of WFM::call() in order to save memory occupied by ZYPP.
+ It saves more than 70 MB or RAM (#224899).
+- 2.15.0
+
+-------------------------------------------------------------------
Old:
----
yast2-backup-2.14.1.tar.bz2
New:
----
yast2-backup-2.15.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-backup.spec ++++++
--- /var/tmp/diff_new_pack.2yKRv9/_old 2006-12-07 19:52:05.000000000 +0100
+++ /var/tmp/diff_new_pack.2yKRv9/_new 2006-12-07 19:52:05.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-backup (Version 2.14.1)
+# spec file for package yast2-backup (Version 2.15.0)
#
# 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-backup
-Version: 2.14.1
+Version: 2.15.0
Release: 1
-License: GNU General Public License (GPL) - all versions
+License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-backup-2.14.1.tar.bz2
+Source0: yast2-backup-2.15.0.tar.bz2
prefix: /usr
BuildRequires: autoyast2-installation perl-XML-Writer update-desktop-files yast2 yast2-bootloader yast2-devtools yast2-network yast2-nfs-client yast2-testsuite yast2-tune yast2-update
Summary: YaST2 - System Backup
@@ -39,7 +39,7 @@
Lukas Ocilka
%prep
-%setup -n yast2-backup-2.14.1
+%setup -n yast2-backup-2.15.0
%build
%{prefix}/bin/y2tool y2autoconf
@@ -79,6 +79,11 @@
%doc %{prefix}/share/doc/packages/yast2-backup
%changelog -n yast2-backup
+* Mon Dec 04 2006 - locilka@suse.cz
+- Calling client backup_get_packages via .target.bash_output
+ instead of WFM::call() in order to save memory occupied by ZYPP.
+ It saves more than 70 MB or RAM (#224899).
+- 2.15.0
* Tue Nov 07 2006 - locilka@suse.cz
- Using Pkg::TargetInitialize instead of Pkg::TargetInit to
initialize installed vs. available packages correctly (#199656).
++++++ yast2-backup-2.14.1.tar.bz2 -> yast2-backup-2.15.0.tar.bz2 ++++++
++++ 5316 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-backup-2.14.1/Makefile.am new/yast2-backup-2.15.0/Makefile.am
--- old/yast2-backup-2.14.1/Makefile.am 2006-11-07 17:03:20.000000000 +0100
+++ new/yast2-backup-2.15.0/Makefile.am 2006-12-05 13:27:05.000000000 +0100
@@ -7,8 +7,7 @@
#
#where devtools are
-PREFIX := $(shell pkg-config --print-errors --variable=prefix yast2-devtools)
-Y2TOOL = $(PREFIX)/bin/y2tool
+Y2TOOL = $(Y2DEVTOOLS_PREFIX)/bin/y2tool
VERSION = $(shell cat $(srcdir)/VERSION)
RPMNAME = $(shell cat $(srcdir)/RPMNAME)
@@ -20,7 +19,7 @@
# do we do Makefile.am for devtools? It is a little special...
IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME))
-DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(PREFIX)/share/YaST2/data/devtools)
+DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools)
ALL_PACKAGES = $(DEVTOOLS_DIR)/admin/all-packages
LEGALESE_DIR = $(if $(HAS_YAST_LICENSE),$(DEVTOOLS_DIR)/admin/copyright/yast,$(DEVTOOLS_DIR)/admin/copyright/gpl)
@@ -34,7 +33,7 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2
# where devtools instal m4 snippets
# argh, executed literally
-#ACLOCAL_AMFLAGS = -I $(PREFIX)/share/aclocal
+#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
ACLOCAL_AMFLAGS = -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
Makefile.am.common: $(DEVTOOLS_DIR)/admin/Makefile.am.common
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-backup-2.14.1/Makefile.am.common new/yast2-backup-2.15.0/Makefile.am.common
--- old/yast2-backup-2.14.1/Makefile.am.common 2006-11-07 17:03:20.000000000 +0100
+++ new/yast2-backup-2.15.0/Makefile.am.common 2006-12-05 13:27:05.000000000 +0100
@@ -29,7 +29,19 @@
dist-hook: check-syntax
+CHECK_SYNTAX = true
check-syntax: $(client_DATA) $(ycpchook)
- if test "$(client_DATA)"; then $(bindir)/ycpc -qE -M. -I. $(YCPCFLAGS) $(filter %.ycp,$^) || exit 1; fi
+ @if test "$(client_DATA)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.ycp,$^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
-include .dep
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-backup-2.14.1/VERSION new/yast2-backup-2.15.0/VERSION
--- old/yast2-backup-2.14.1/VERSION 2006-11-07 16:59:01.000000000 +0100
+++ new/yast2-backup-2.15.0/VERSION 2006-12-04 09:34:47.000000000 +0100
@@ -1 +1 @@
-2.14.1
+2.15.0
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-backup-2.14.1/configure.in new/yast2-backup-2.15.0/configure.in
--- old/yast2-backup-2.14.1/configure.in 2006-11-07 17:03:20.000000000 +0100
+++ new/yast2-backup-2.15.0/configure.in 2006-12-05 13:27:05.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2-backup
dnl
-dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-backup, 2.14.1, http://bugs.opensuse.org/, yast2-backup)
+AC_INIT(yast2-backup, 2.15.0, http://bugs.opensuse.org/, yast2-backup)
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.14.1"
+VERSION="2.15.0"
RPMNAME="yast2-backup"
MAINTAINER="Lukas Ocilka "
@@ -110,6 +110,8 @@
AC_MSG_ERROR(xgettext is missing; please install gettext-devel.)
fi
+Y2DEVTOOLS_PREFIX=`pkg-config --print-errors --variable=prefix yast2-devtools`
+AC_SUBST(Y2DEVTOOLS_PREFIX)
devtools_ybindir=`pkg-config --print-errors --variable=ybindir yast2-devtools`
devtools_yast2dir=`pkg-config --print-errors --variable=yast2dir yast2-devtools`
@@ -142,6 +144,9 @@
if test "$YCPC" = "false"; then
AC_MSG_ERROR([ycpc is not installed])
fi
+AC_CHECK_FILE($devtools_yast2dir/data/testsuite/Makefile.testsuite, [], [
+ AC_MSG_WARN([yast2-testsuite.rpm is not installed])
+])
AC_CONFIG_FILES(Makefile agents/Makefile
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-backup-2.14.1/src/backup_get_packages.ycp new/yast2-backup-2.15.0/src/backup_get_packages.ycp
--- old/yast2-backup-2.14.1/src/backup_get_packages.ycp 2006-11-07 15:30:14.000000000 +0100
+++ new/yast2-backup-2.15.0/src/backup_get_packages.ycp 2006-12-04 11:32:54.000000000 +0100
@@ -21,16 +21,25 @@
import "Mode";
/**
- * Read packages available on the installation sources
- * (Requires at least one installation source, otherwise return empty list)
- * @return list<string> available packages
+ * Read packages available on the installation sources and writes them to the
+ * temporary file. Requires at least one installation source.
+ *
+ * @param string temporary file name
*/
y2milestone("Reading packages available on the installation sources...");
+ string filename = nil;
+ if (is(WFM::Args(0), string)) {
+ string filename = (string) WFM::Args (0);
+ } else {
+ y2error ("Wrong parameter for script");
+ return false;
+ }
+
// fake return for testsuites
if (Mode::test()) {
y2milestone("SKIPPING");
- return [];
+ return true;
}
Pkg::TargetInitialize ("/");
@@ -53,7 +62,7 @@
{
foreach(integer source_id, sources,
``{
- map source_description = Pkg::SourceProduct(source_id);
+ map source_description = Pkg::SourceProductData (source_id);
y2debug("Source %1 description: %2", source_id, source_description);
@@ -132,5 +141,11 @@
size(installation_packages), installation_packages
);
- return installation_packages;
+ // write the output to the temporary file
+ y2milestone ("Writing list of %1 packages into the %2 file",
+ size (installation_packages), filename
+ );
+ SCR::Write (.target.ycp, filename, installation_packages);
+
+ return true;
}
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-backup-2.14.1/src/functions.ycp new/yast2-backup-2.15.0/src/functions.ycp
--- old/yast2-backup-2.14.1/src/functions.ycp 2006-10-09 15:51:45.000000000 +0200
+++ new/yast2-backup-2.15.0/src/functions.ycp 2006-12-04 09:34:29.000000000 +0100
@@ -8,7 +8,7 @@
* Authors:
* Ladislav Slezak
*
- * $Id: functions.ycp 32274 2006-08-09 13:26:24Z locilka $
+ * $Id: functions.ycp 34709 2006-12-04 08:34:27Z locilka $
*
* Functions used by backup module.
*/
@@ -24,6 +24,7 @@
import "FileUtils";
import "Mode";
import "FileUtils";
+import "Directory";
textdomain "backup";
@@ -696,10 +697,50 @@
* (Requires at least one installation source, otherwise return empty list)
* @return list<string> available packages
*/
- define list<string> GetInstallPackages() {
- y2milestone("---------------------------------------------");
- return (list <string>) WFM::call("backup_get_packages", []);
- y2milestone("---------------------------------------------");
+ define list <string> GetInstallPackages () {
+ y2milestone("--- backup_get_packages ---");
+ // was: return (list <string>) WFM::call("backup_get_packages", []);
+ // bugzilla #224899, saves memory occupied by zypp data (packager)
+
+ string temporary_file = sformat ("%1/backup-list-of-packages", Directory::tmpdir);
+ if (FileUtils::Exists (temporary_file)) {
+ SCR::Execute (.target.remove, temporary_file);
+ }
+
+ string yastbin = "";
+ if (FileUtils::Exists ("/sbin/yast"))
+ yastbin = "/sbin/yast";
+ else if (FileUtils::Exists ("/sbin/yast2"))
+ yastbin = "/sbin/yast2";
+ else {
+ y2error ("Neither /sbin/yast nor /sbin/yast2 exist");
+ return [];
+ }
+
+ string cmd = sformat("%1 backup_get_packages %2", yastbin, temporary_file);
+ y2milestone ("Running command: '%1'", cmd);
+ map command = (map) SCR::Execute(.target.bash_output, cmd);
+
+ list <string> ret = nil;
+
+ if (command["exit"]:nil != 0) {
+ y2error ("Unexpected error: %1", command);
+ return [];
+ } else {
+ if (FileUtils::Exists (temporary_file)) {
+ ret = (list <string>) SCR::Read (.target.ycp, temporary_file);
+ SCR::Execute (.target.remove, temporary_file);
+ if (ret == nil) {
+ return [];
+ y2error ("Error while reading %1", temporary_file);
+ }
+ }
+ }
+ y2debug ("Client returned %1", ret);
+
+ y2milestone("--- backup_get_packages ---");
+
+ return ret;
}
/**
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org