Hello community,
here is the log from the commit of package yast2-packager
checked in at Mon Oct 16 18:48:26 CEST 2006.
--------
--- yast2-packager/yast2-packager.changes 2006-09-27 10:16:09.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-packager/yast2-packager.changes 2006-10-16 17:30:20.000000000 +0200
@@ -1,0 +2,12 @@
+Mon Oct 16 16:36:18 CEST 2006 - lslezak@suse.cz
+
+- script callbacks - installation and run-time (feature #100233)
+- 2.13.153
+
+-------------------------------------------------------------------
+Mon Oct 16 11:09:09 CEST 2006 - locilka@suse.cz
+
+- Window listing found SLP sources in ncurses is newly based on the
+ currently available space (#209426).
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-2.13.152.tar.bz2
New:
----
yast2-packager-2.13.153.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.c01W07/_old 2006-10-16 18:48:16.000000000 +0200
+++ /var/tmp/diff_new_pack.c01W07/_new 2006-10-16 18:48:16.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.13.152)
+# spec file for package yast2-packager (Version 2.13.153)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,17 +11,17 @@
# norootforbuild
Name: yast2-packager
-Version: 2.13.152
+Version: 2.13.153
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.13.152.tar.bz2
+Source0: yast2-packager-2.13.153.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen gcc-c++ libxcrypt-devel libxslt perl-XML-Writer sgml-skel update-desktop-files yast2 yast2-country yast2-devtools yast2-slp yast2-testsuite yast2-xml
Requires: checkmedia yast2-country
-# patch/delta RPM callbacks, source callbacks
-Requires: yast2-pkg-bindings >= 2.13.95
+# Script callbacks
+Requires: yast2-pkg-bindings >= 2.13.99
# Linuxrc::display_ip
Requires: yast2 >= 2.13.67
Provides: yast2-config-package-manager
@@ -45,7 +45,7 @@
Arvin Schnell
%prep
-%setup -n yast2-packager-2.13.152
+%setup -n yast2-packager-2.13.153
%build
%{prefix}/bin/y2tool y2autoconf
@@ -82,6 +82,12 @@
%doc %{prefix}/share/doc/packages/yast2-packager
%changelog -n yast2-packager
+* Mon Oct 16 2006 - lslezak@suse.cz
+- script callbacks - installation and run-time (feature #100233)
+- 2.13.153
+* Mon Oct 16 2006 - locilka@suse.cz
+- Window listing found SLP sources in ncurses is newly based on the
+ currently available space (#209426).
* Wed Sep 27 2006 - locilka@suse.cz
- YCP modules that originated in yast2-packager and had been in
yast2-installation were moved back to yast2-packager. Done in
++++++ yast2-packager-2.13.152.tar.bz2 -> yast2-packager-2.13.153.tar.bz2 ++++++
++++ 6023 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-packager-2.13.152/MAINTAINER new/yast2-packager-2.13.153/MAINTAINER
--- old/yast2-packager-2.13.152/MAINTAINER 2006-06-26 09:05:58.000000000 +0200
+++ new/yast2-packager-2.13.153/MAINTAINER 2006-10-16 10:43:03.000000000 +0200
@@ -1 +1 @@
-Jiri Srain
+Ladislav Slezak
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-packager-2.13.152/Makefile.am new/yast2-packager-2.13.153/Makefile.am
--- old/yast2-packager-2.13.152/Makefile.am 2006-09-27 10:34:54.000000000 +0200
+++ new/yast2-packager-2.13.153/Makefile.am 2006-10-16 16:55:49.000000000 +0200
@@ -67,7 +67,7 @@
# because the prerequisite is made here (not anymore!)
# and we don't want any paths in y2autoconf
# info '(autoconf)config.status Invocation'
-$(RPMNAME).pc: $(RPMNAME).pc.in
+$(RPMNAME).pc: $(RPMNAME).pc.in config.status
./config.status --file=$@:$<
if CREATE_PKGCONFIG_NOARCH
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-packager-2.13.152/Makefile.am.common new/yast2-packager-2.13.153/Makefile.am.common
--- old/yast2-packager-2.13.152/Makefile.am.common 2006-09-27 10:34:54.000000000 +0200
+++ new/yast2-packager-2.13.153/Makefile.am.common 2006-10-16 16:55:48.000000000 +0200
@@ -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-packager-2.13.152/VERSION new/yast2-packager-2.13.153/VERSION
--- old/yast2-packager-2.13.152/VERSION 2006-09-27 10:05:48.000000000 +0200
+++ new/yast2-packager-2.13.153/VERSION 2006-10-16 16:37:54.000000000 +0200
@@ -1 +1 @@
-2.13.152
+2.13.153
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-packager-2.13.152/configure.in new/yast2-packager-2.13.153/configure.in
--- old/yast2-packager-2.13.152/configure.in 2006-09-27 10:34:54.000000000 +0200
+++ new/yast2-packager-2.13.153/configure.in 2006-10-16 16:55:48.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-packager
dnl
-dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.13.16 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-packager, 2.13.152, http://bugs.opensuse.org/, yast2-packager)
+AC_INIT(yast2-packager, 2.13.153, http://bugs.opensuse.org/, yast2-packager)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,9 +17,9 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.152"
+VERSION="2.13.153"
RPMNAME="yast2-packager"
-MAINTAINER="Jiri Srain "
+MAINTAINER="Ladislav Slezak "
dnl pkgconfig honors lib64
pkgconfigdir=\${libdir}/pkgconfig
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-packager-2.13.152/src/clients/inst_desktop.ycp new/yast2-packager-2.13.153/src/clients/inst_desktop.ycp
--- old/yast2-packager-2.13.152/src/clients/inst_desktop.ycp 2006-09-25 15:44:12.000000000 +0200
+++ new/yast2-packager-2.13.153/src/clients/inst_desktop.ycp 2006-10-13 11:12:08.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Desktop Selection
* Authors: Jiri Srain
*
- * $Id: inst_desktop.ycp 33080 2006-09-25 09:17:08Z jsrain $
+ * $Id: inst_desktop.ycp 33383 2006-10-13 09:12:02Z lslezak $
*
*/
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-packager-2.13.152/src/clients/inst_rpmcopy.ycp new/yast2-packager-2.13.153/src/clients/inst_rpmcopy.ycp
--- old/yast2-packager-2.13.152/src/clients/inst_rpmcopy.ycp 2006-09-22 22:59:29.000000000 +0200
+++ new/yast2-packager-2.13.153/src/clients/inst_rpmcopy.ycp 2006-10-13 11:12:08.000000000 +0200
@@ -13,7 +13,7 @@
* Packages module :
* "installed"
*
- * $Id: inst_rpmcopy.ycp 33055 2006-09-22 12:06:45Z lslezak $
+ * $Id: inst_rpmcopy.ycp 33383 2006-10-13 09:12:02Z lslezak $
*/
{
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-packager-2.13.152/src/clients/sw_single.ycp new/yast2-packager-2.13.153/src/clients/sw_single.ycp
--- old/yast2-packager-2.13.152/src/clients/sw_single.ycp 2006-09-22 22:59:29.000000000 +0200
+++ new/yast2-packager-2.13.153/src/clients/sw_single.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -7,7 +7,7 @@
* Purpose: contains dialog loop for workflows:
* "Install/Remove software"
*
- * $Id: sw_single.ycp 33055 2006-09-22 12:06:45Z lslezak $
+ * $Id: sw_single.ycp 33383 2006-10-13 09:12:02Z lslezak $
*/
{
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-packager-2.13.152/src/include/checkmedia/ui.ycp new/yast2-packager-2.13.153/src/include/checkmedia/ui.ycp
--- old/yast2-packager-2.13.152/src/include/checkmedia/ui.ycp 2006-09-22 22:59:29.000000000 +0200
+++ new/yast2-packager-2.13.153/src/include/checkmedia/ui.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -8,7 +8,7 @@
* Authors:
* Ladislav Slezak
*
- * $Id: ui.ycp 33003 2006-09-20 10:50:07Z lslezak $
+ * $Id: ui.ycp 33383 2006-10-13 09:12:02Z lslezak $
*
* All user interface functions.
*
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-packager-2.13.152/src/include/inst_source_dialogs.ycp new/yast2-packager-2.13.153/src/include/inst_source_dialogs.ycp
--- old/yast2-packager-2.13.152/src/include/inst_source_dialogs.ycp 2006-06-30 09:55:08.000000000 +0200
+++ new/yast2-packager-2.13.153/src/include/inst_source_dialogs.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -10,7 +10,7 @@
* Displays possibilities to install from NFS, CD or partion
* Do the "mount" for testing the input.
*
- * $Id: inst_source_dialogs.ycp 31696 2006-06-29 09:01:51Z jsrain $
+ * $Id: inst_source_dialogs.ycp 33383 2006-10-13 09:12:02Z lslezak $
*/
{
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-packager-2.13.152/src/modules/CheckMedia.ycp new/yast2-packager-2.13.153/src/modules/CheckMedia.ycp
--- old/yast2-packager-2.13.152/src/modules/CheckMedia.ycp 2006-09-27 10:30:27.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/CheckMedia.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -8,7 +8,7 @@
* Authors:
* Ladislav Slezak
*
- * $Id: CheckMedia.ycp 33162 2006-09-27 08:30:25Z locilka $
+ * $Id: CheckMedia.ycp 33383 2006-10-13 09:12:02Z lslezak $
*
* Input and output routines.
*
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-packager-2.13.152/src/modules/InstURL.ycp new/yast2-packager-2.13.153/src/modules/InstURL.ycp
--- old/yast2-packager-2.13.152/src/modules/InstURL.ycp 2006-09-27 10:30:27.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/InstURL.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -6,7 +6,7 @@
* Purpose: Convert /etc/install.inf data to URL
*
*
- * $Id: InstURL.ycp 33162 2006-09-27 08:30:25Z locilka $
+ * $Id: InstURL.ycp 33383 2006-10-13 09:12:02Z lslezak $
*/
{
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-packager-2.13.152/src/modules/PackageCallbacks.ycp new/yast2-packager-2.13.153/src/modules/PackageCallbacks.ycp
--- old/yast2-packager-2.13.152/src/modules/PackageCallbacks.ycp 2006-09-22 22:59:29.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/PackageCallbacks.ycp 2006-10-16 17:21:50.000000000 +0200
@@ -28,6 +28,7 @@
global boolean _provide_popup = false;
global boolean _source_popup = false;
global boolean _package_popup = false;
+ global boolean _script_popup = false;
global string _package_name = "";
global integer _package_size = 0;
@@ -81,7 +82,7 @@
*/
global boolean StartProvide (string name, integer archivesize, boolean remote)
{
- y2internal("StartProvide: name: %1, remote: %2", name, remote);
+ y2milestone("StartProvide: name: %1, remote: %2", name, remote);
if (remote)
{
string sz = String::FormatSizeWithPrecision (archivesize, 2, false);
@@ -104,7 +105,7 @@
*/
global boolean ProgressProvide (integer percent)
{
- y2internal("ProgressProvide: %1", percent);
+ y2milestone("ProgressProvide: %1", percent);
if (_provide_popup)
{
UI::ChangeWidget(`id(`progress), `Value, percent);
@@ -172,7 +173,7 @@
*/
global string DoneProvide (integer error, string reason, string name)
{
- y2internal("DoneProvide: %1", error);
+ y2milestone("DoneProvide: %1", error);
if (_provide_popup)
UI::CloseDialog();
@@ -714,7 +715,7 @@
if (_source_open == 0)
{
// the popup doesn't exist
- y2internal("Opening source progress popup: %1", text);
+ y2milestone("Opening source progress popup: %1", text);
// if the text is too long then display only part of the message
// and then refresh the label to the full string
@@ -753,11 +754,11 @@
UI::ChangeWidget(`progress, `Label, text);
// reset the progressbar
UI::ChangeWidget(`progress, `Value, 0);
- y2internal("new label: %1", text);
+ y2milestone("OpenSourcePopup: new label: %1", text);
}
_source_open = _source_open + 1;
- y2internal("OpenSourcePopup: new _source_open: %1", _source_open);
+ y2milestone("OpenSourcePopup: _source_open: %1", _source_open);
}
boolean SourcePopupSetProgress(integer value)
@@ -781,10 +782,10 @@
if (_source_open == 0)
{
- y2internal("Closing source progress popup");
+ y2milestone("Closing source progress popup");
UI::CloseDialog();
}
- y2internal("CloseSourcePopup: new _source_open: %1", _source_open);
+ y2milestone("CloseSourcePopup: _source_open: %1", _source_open);
}
global void SourceCreateStart(string url) {
@@ -1167,7 +1168,149 @@
Report::ShowText (_("Failed to download patch RPM"), descr);
}
-// progress use the same callback as plain package download
+
+ global string FormatPatchName(string patch_name, string patch_version, string patch_arch)
+ {
+ string patch_full_name = (patch_name != nil && patch_name != "") ? patch_name : "";
+
+ if (patch_full_name != "")
+ {
+ if (patch_version != nil && patch_version != "")
+ {
+ patch_full_name = patch_full_name + "-" + patch_version;
+ }
+
+ if (patch_arch != nil && patch_arch != "")
+ {
+ patch_full_name = patch_full_name + "." + patch_arch;
+ }
+
+ }
+
+ return patch_full_name;
+ }
+
+ global void ScriptStart(string patch_name, string patch_version, string patch_arch, string script_path, boolean installation)
+ {
+ string patch_full_name = FormatPatchName(patch_name, patch_version, patch_arch);
+
+ y2milestone("ScriptStart callback: patch: %1, script: %2, installation: %3", patch_full_name, script_path, installation);
+
+ if (Mode::commandline())
+ {
+ CommandLine::PrintVerbose(sformat(_("Starting script %1 (patch %2)..."), script_path, patch_full_name));
+ }
+ else
+ {
+ term progressbox = `VBox(
+ `HSpacing(40),
+ // popup heading
+ `Heading(_("Running Script")),
+ `Left(
+ `HBox
+ (
+ // label, script name follows
+ `Left(`Label(`opt(`boldFont), _("Script: "))),
+ `Left(`Label(script_path))
+ ),
+ (patch_full_name != "") ?
+ `HBox
+ (
+ // label, patch name follows
+ `Left(`Label(`opt(`boldFont), _("Patch: "))),
+ `Left(`Label(patch_full_name))
+ )
+ :
+ `Empty()
+ ),
+
+ // label
+ `LogView(`id(`log), _("Output of the Script")),
+
+ `PushButton(`id(`abort), Label::AbortButton())
+ );
+
+ if (_script_popup)
+ UI::CloseDialog ();
+
+ UI::OpenDialog(progressbox);
+ _script_popup = true;
+ }
+ }
+
+ global boolean ScriptProgress (boolean ping, string output)
+ {
+ y2milestone("ScriptProgress: ping:%1, output: %2", ping, output);
+
+ if (_script_popup)
+ {
+ if (ping)
+ {
+ // TODO: refresh progress indicator
+ }
+
+ if (output != nil && output != "")
+ {
+ // add the output to the log widget
+ UI::ChangeWidget(`id(`log), `Value, output);
+ }
+
+ any input = UI::PollInput ();
+ if (input == `abort || input == `close)
+ return false;
+ }
+ return true;
+ }
+
+ global void ScriptProblem(string description)
+ {
+ y2warning("ScriptProblem: %1", description);
+ Popup::Error(description);
+ }
+
+ global void ScriptFinish()
+ {
+ y2milestone("ScriptFinish");
+
+ if (_script_popup)
+ {
+ UI::CloseDialog();
+ }
+ }
+
+ global void Message(string patch_name, string patch_version, string patch_arch, string message)
+ {
+ string patch_full_name = FormatPatchName(patch_name, patch_version, patch_arch);
+ y2milestone("Message (%1): %2", patch_full_name, message);
+
+ if (patch_full_name != "")
+ {
+ // label, %1 is patch name with version and architecture
+ patch_full_name = sformat(_("Patch: %1\n\n"), patch_full_name);
+ }
+
+ Popup::LongMessage(patch_full_name + message);
+ }
+
+ global void SetScriptCallbacks()
+ {
+ Pkg::CallbackScriptStart("PackageCallbacks::ScriptStart");
+ Pkg::CallbackScriptStart("PackageCallbacks::ScriptProgress");
+ Pkg::CallbackScriptStart("PackageCallbacks::ScriptProblem");
+ Pkg::CallbackScriptStart("PackageCallbacks::ScriptFinish");
+
+ Pkg::CallbackMessage("PackageCallbacks::Message");
+ }
+
+ global void ClearScriptCallbacks()
+ {
+ Pkg::CallbackScriptStart("");
+ Pkg::CallbackScriptStart("");
+ Pkg::CallbackScriptStart("");
+ Pkg::CallbackScriptStart("");
+
+ Pkg::CallbackMessage("");
+ }
//=============================================================================
// constructor and callback init
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-packager-2.13.152/src/modules/Packages.ycp new/yast2-packager-2.13.153/src/modules/Packages.ycp
--- old/yast2-packager-2.13.152/src/modules/Packages.ycp 2006-09-08 09:42:44.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/Packages.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -3,7 +3,7 @@
* Package: Package selections
* Authors: Anas Nashif
*
- * $Id: Packages.ycp 32763 2006-09-07 12:20:02Z lslezak $
+ * $Id: Packages.ycp 33383 2006-10-13 09:12:02Z lslezak $
*/
{
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-packager-2.13.152/src/modules/SlideShow.ycp new/yast2-packager-2.13.153/src/modules/SlideShow.ycp
--- old/yast2-packager-2.13.152/src/modules/SlideShow.ycp 2006-09-18 17:17:26.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/SlideShow.ycp 2006-10-16 13:24:02.000000000 +0200
@@ -1806,6 +1806,13 @@
Pkg::CallbackProgressPatchDownload ("SlideShowCallbacks::ProgressProvide");
Pkg::CallbackProblemPatchDownload ("SlideShowCallbacks::ProblemPatchDownload");
Pkg::CallbackFinishPatchDownload ("SlideShowCallbacks::FinishPatchDeltaProvide");
+
+ Pkg::CallbackScriptStart("SlideShowCallbacks::ScriptStart");
+ Pkg::CallbackScriptProgress("SlideShowCallbacks::ScriptProgress");
+ Pkg::CallbackScriptProblem("SlideShowCallbacks::ScriptProblem");
+ Pkg::CallbackScriptFinish("SlideShowCallbacks::ScriptFinish");
+
+ Pkg::CallbackMessage("SlideShowCallbacks::Message");
}
@@ -1841,6 +1848,13 @@
Pkg::CallbackProgressPatchDownload ("");
Pkg::CallbackProblemPatchDownload ("");
Pkg::CallbackFinishPatchDownload ("");
+
+ Pkg::CallbackScriptStart("");
+ Pkg::CallbackScriptProgress("");
+ Pkg::CallbackScriptProblem("");
+ Pkg::CallbackScriptFinish("");
+
+ Pkg::CallbackMessage("");
}
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-packager-2.13.152/src/modules/SlideShowCallbacks.ycp new/yast2-packager-2.13.153/src/modules/SlideShowCallbacks.ycp
--- old/yast2-packager-2.13.152/src/modules/SlideShowCallbacks.ycp 2006-08-18 15:18:40.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/SlideShowCallbacks.ycp 2006-10-16 16:06:53.000000000 +0200
@@ -120,6 +120,77 @@
}
+ global void ScriptStart(string patch_name, string patch_version, string patch_arch, string script_path, boolean installation)
+ {
+ string patch_full_name = PackageCallbacks::FormatPatchName(patch_name, patch_version, patch_arch);
+ y2milestone("ScriptStart: patch:%1, script:%2, installation:%3", patch_full_name, script_path, installation);
+
+ // reset the progressbar
+ if (UI::WidgetExists(`progressCurrentPackage))
+ {
+ UI::ChangeWidget(`progressCurrentPackage, `Label, patch_full_name);
+ UI::ChangeWidget(`progressCurrentPackage, `Value, 0);
+ }
+
+ // message in the installation log widget, %1 is a patch name which contains the script
+ string log_line = sformat(_("Starting script %1"), patch_full_name);
+
+ SlideShow::AppendMessageToInstLog(log_line);
+ }
+
+ global boolean ScriptProgress (boolean ping, string output)
+ {
+ y2milestone("ScriptProgress: ping:%1, output: %2", ping, output);
+
+ if (output != nil && output != "")
+ {
+ string log_line = output;
+
+ // remove the trailing new line character
+ if (substring(output, size(output) - 1, 1) == "\n")
+ {
+ output = substring(output, 0, size(output) - 1);
+ }
+
+ // add the output to the log widget
+ SlideShow::AppendMessageToInstLog(output);
+ }
+
+ any input = UI::PollInput ();
+ y2milestone("input: %1", input);
+
+ if (input == `abort || input == `close)
+ return false;
+
+ return true;
+ }
+
+ global void ScriptProblem(string description)
+ {
+ y2milestone("ScriptProblem: %1", description);
+ Popup::Error(description);
+ }
+
+ global void ScriptFinish()
+ {
+ y2milestone("ScriptFinish");
+ }
+
+ global void Message(string patch_name, string patch_version, string patch_arch, string message)
+ {
+ string patch_full_name = PackageCallbacks::FormatPatchName(patch_name, patch_version, patch_arch);
+ y2milestone("Message (%1): %2", patch_full_name, message);
+
+ if (patch_full_name != "")
+ {
+ // label, %1 is patch name with version and architecture
+ patch_full_name = sformat(_("Patch %1\n\n"), patch_full_name);
+ }
+
+ Popup::LongMessage(patch_full_name + message);
+ }
+
+
//--------------------------------------------------------------------------
// slide show
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-packager-2.13.152/src/modules/SourceManager.ycp new/yast2-packager-2.13.153/src/modules/SourceManager.ycp
--- old/yast2-packager-2.13.152/src/modules/SourceManager.ycp 2006-09-27 10:30:27.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/SourceManager.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -7,7 +7,7 @@
* Martin Vidner
* Status: Work in Progress
*
- * $Id: SourceManager.ycp 33162 2006-09-27 08:30:25Z locilka $
+ * $Id: SourceManager.ycp 33383 2006-10-13 09:12:02Z lslezak $
*
* Representation of the configuration of source-manager.
* Input and output routines.
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-packager-2.13.152/src/modules/SourceManagerSLP.ycp new/yast2-packager-2.13.153/src/modules/SourceManagerSLP.ycp
--- old/yast2-packager-2.13.152/src/modules/SourceManagerSLP.ycp 2006-09-27 09:49:47.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/SourceManagerSLP.ycp 2006-10-16 16:36:12.000000000 +0200
@@ -77,16 +77,31 @@
filter_dialog = `MarginBox (0.5, 0.5, `Frame (
// frame label
_("Filter Form"),
- `HBox (
+ `VSquash (`HBox (
// Only some characters are valid 'A-Z a-z 0-9 .*-'
`HSquash(`TextEntry (`id (`filter_text), "")),
// push button
`PushButton(`id(`filter), _("&Filter")),
`HStretch()
- )
+ ))
));
}
+ // bugzilla #209426
+ // window size (in ncurses) based on currently available space
+ map display_info = UI::GetDisplayInfo();
+ integer min_size_x = 76;
+ integer min_size_y = 19;
+ if (display_info["TextMode"]:true) {
+ min_size_x = tointeger(display_info["Width"]:80) * 3 / 4;
+ min_size_y = tointeger(display_info["Height"]:25) * 2 / 3 - 5;
+ if (min_size_x < 76) min_size_x = 76;
+ if (min_size_y < 18) min_size_y = 18;
+ y2milestone("X/x Y/y %1/%2 %3/%4",
+ display_info["Width"]:80, min_size_x,
+ display_info["Height"]:25, min_size_y);
+ }
+
UI::OpenDialog (
`VBox (
`HBox (
@@ -95,8 +110,8 @@
`Left (`Heading(`id(`search_heading), _("Choose SLP Catalog")))
),
filter_dialog,
- `MinSize(
- 76, 19,
+ `MarginBox (0.5, 0, `MinSize(
+ min_size_x, min_size_y,
`Tree (
`id (`tree_of_services),
`opt (`notify),
@@ -104,7 +119,7 @@
_("Available Installation Products"),
[]
)
- ),
+ )),
`PushButton(`id(`details), _("Details...")),
`VSpacing (1),
`HBox (
@@ -314,7 +329,7 @@
SetSearchUI (`Label (sformat (
// progress information, %1 stands for number of services
- _("Collecting information about %1 services found..."),
+ _("Collecting information of %1 services found..."),
number_of_services
)));
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-packager-2.13.152/src/modules/SpaceCalculation.ycp new/yast2-packager-2.13.153/src/modules/SpaceCalculation.ycp
--- old/yast2-packager-2.13.152/src/modules/SpaceCalculation.ycp 2006-09-18 17:17:26.000000000 +0200
+++ new/yast2-packager-2.13.153/src/modules/SpaceCalculation.ycp 2006-10-13 11:12:09.000000000 +0200
@@ -10,7 +10,7 @@
* on Installation::sourcedir
*
*
- * $Id: SpaceCalculation.ycp 32942 2006-09-18 14:18:45Z lslezak $
+ * $Id: SpaceCalculation.ycp 33383 2006-10-13 09:12:02Z lslezak $
*/
{
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-packager-2.13.152/src/modules/test.ycp new/yast2-packager-2.13.153/src/modules/test.ycp
--- old/yast2-packager-2.13.152/src/modules/test.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-2.13.153/src/modules/test.ycp 2005-11-02 13:29:02.000000000 +0100
@@ -0,0 +1,58 @@
+
+{
+ import "Package";
+ import "CommandLine";
+
+ textdomain "test";
+
+ boolean startHandler(map opts) {
+ Package::InstallAll(["samba-doc", "qt3-devel-doc"]);
+// Package::InstallAll(["sambadocdfdfdf"]);
+
+ return true;
+ }
+
+ symbol GUIhandler() {
+ y2milestone("GUIhandler");
+ return `next;
+ }
+
+ boolean Read() {
+ return true;
+ }
+
+ boolean Write() {
+ return true;
+ }
+
+ map cmdline = $[
+ // help text
+ "help" : _("Start installation in a virtual machine"),
+ "id" : "vm",
+ "guihandler": GUIhandler,
+ "initialize": Read,
+ "finish" : Write,
+ "actions" : $[
+ "start" : $[
+ // command description
+ "help" : _("Start installation"),
+ "handler" : startHandler
+ ]
+ ],
+ "options" : $[
+ "configured" : $[
+ // option description
+ "help" : _("List only configured devices")
+ ],
+ "all" : $[
+ // option description
+ "help" : _("List all detected IDE devices")
+ ]
+ ],
+ "mappings" : $[
+ "start" : ["configured", "all"],
+ ]
+ ];
+
+ any ret = CommandLine::Run(cmdline);
+}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org