Hello community,
here is the log from the commit of package yast2-packager
checked in at Tue Mar 28 18:34:42 CEST 2006.
--------
--- /work/SRC/all/yast2-packager/yast2-packager.changes 2006-03-28 12:53:17.000000000 +0200
+++ /work/src/done/STABLE/yast2-packager/yast2-packager.changes 2006-03-28 17:43:06.000000000 +0200
@@ -1,0 +2,17 @@
+Tue Mar 28 17:42:20 CEST 2006 - locilka@suse.cz
+
+- Added the first implementation of SignatureCheckDialogs module.
+- 2.13.54
+
+-------------------------------------------------------------------
+Tue Mar 28 14:10:29 CEST 2006 - visnov@suse.cz
+
+- Show type of installation source if name is not known
+
+-------------------------------------------------------------------
+Tue Mar 28 13:41:20 CEST 2006 - locilka@suse.cz
+
+- Moving ZMD sync to the pkg_finish client that is called after the
+ switch_scr client (#161299).
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-2.13.53.tar.bz2
New:
----
yast2-packager-2.13.54.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.xwU2sG/_old 2006-03-28 18:34:22.000000000 +0200
+++ /var/tmp/diff_new_pack.xwU2sG/_new 2006-03-28 18:34:22.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.13.53)
+# spec file for package yast2-packager (Version 2.13.54)
#
# 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-packager
-Version: 2.13.53
+Version: 2.13.54
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.13.53.tar.bz2
+Source0: yast2-packager-2.13.54.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-installation yast2-testsuite yast2-xml
Requires: yast2 yast2-installation checkmedia yast2-country
@@ -41,7 +41,7 @@
Arvin Schnell
%prep
-%setup -n yast2-packager-2.13.53
+%setup -n yast2-packager-2.13.54
%build
%{prefix}/bin/y2tool y2autoconf
@@ -78,6 +78,14 @@
%doc %{prefix}/share/doc/packages/yast2-packager
%changelog -n yast2-packager
+* Tue Mar 28 2006 - locilka@suse.cz
+- Added the first implementation of SignatureCheckDialogs module.
+- 2.13.54
+* Tue Mar 28 2006 - visnov@suse.cz
+- Show type of installation source if name is not known
+* Tue Mar 28 2006 - locilka@suse.cz
+- Moving ZMD sync to the pkg_finish client that is called after the
+ switch_scr client (#161299).
* Tue Mar 28 2006 - visnov@suse.cz
- fix slideshow in 1st stage (#154324)
- 2.13.53
++++++ yast2-packager-2.13.53.tar.bz2 -> yast2-packager-2.13.54.tar.bz2 ++++++
++++ 3256 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.53/Makefile.am new/yast2-packager-2.13.54/Makefile.am
--- old/yast2-packager-2.13.53/Makefile.am 2006-03-13 14:18:11.000000000 +0100
+++ new/yast2-packager-2.13.54/Makefile.am 2006-03-28 17:45:50.000000000 +0200
@@ -154,7 +154,7 @@
$(PREFIX)/bin/y2tool create-spec < $$i > $$here/package/$${newname} ; \
done
-package: check-up-to-date check-tagversion check-all-packages package-local
+package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local
TAGVERSION = $(PREFIX)/bin/y2tool tagversion
@@ -199,6 +199,9 @@
false; \
fi
+check-textdomain:
+ $(PREFIX)/bin/y2tool check-textdomain $(srcdir)
+
stable: checkin-stable
checkin-stable: package
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.53/VERSION new/yast2-packager-2.13.54/VERSION
--- old/yast2-packager-2.13.53/VERSION 2006-03-28 11:36:19.000000000 +0200
+++ new/yast2-packager-2.13.54/VERSION 2006-03-28 13:41:14.000000000 +0200
@@ -1 +1 @@
-2.13.53
+2.13.54
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.53/configure.in new/yast2-packager-2.13.54/configure.in
--- old/yast2-packager-2.13.53/configure.in 2006-03-13 14:18:11.000000000 +0100
+++ new/yast2-packager-2.13.54/configure.in 2006-03-28 17:45:50.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-packager, 2.13.41, http://www.suse.de/feedback, yast2-packager)
+AC_INIT(yast2-packager, 2.13.54, http://www.suse.de/feedback, yast2-packager)
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.13.41"
+VERSION="2.13.54"
RPMNAME="yast2-packager"
MAINTAINER="Jiri Srain "
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.53/src/clients/inst_rpmcopy.ycp new/yast2-packager-2.13.54/src/clients/inst_rpmcopy.ycp
--- old/yast2-packager-2.13.53/src/clients/inst_rpmcopy.ycp 2006-03-28 11:32:23.000000000 +0200
+++ new/yast2-packager-2.13.54/src/clients/inst_rpmcopy.ycp 2006-03-28 13:42:10.000000000 +0200
@@ -13,7 +13,7 @@
* Packages module :
* "installed"
*
- * $Id: inst_rpmcopy.ycp 29429 2006-03-27 14:28:35Z locilka $
+ * $Id: inst_rpmcopy.ycp 29461 2006-03-28 11:42:01Z locilka $
*/
{
@@ -34,7 +34,6 @@
import "Report";
import "Kernel";
import "Service";
- import "Message";
// variables related to installation source caching
@@ -500,162 +499,6 @@
// end of installation source caching functions
// ------------------------------------------------------------------------------------------------------
- // ------------------------------------------------------------------------------------------------------
- // adding YaST installation source into the ZMD
-
- /**
- * Runs a bash command with timeout.
- * @struct Returns map $[
- * "exit" : int_return_code,
- * "stdout" : [ "script", "stdout", "lines" ],
- * "stderr" : [ "script", "stderr", "lines" ],
- * ]
- *
- * @param string command
- * @param integer timeout in sec.
- * @return map with out, err and ret_code
- */
- map RunCommandWithTimeout (string run_command, integer script_time_out) {
- y2milestone("Running command \"%1\" in background...", run_command);
-
- boolean started = (boolean) SCR::Execute(.background.run_output_err, run_command);
- if (!started) {
- y2error("Cannot run '%1'", run_command);
- return nil;
- }
-
- list<string> script_out = [];
- list<string> script_err = [];
- integer time_spent = 0;
- integer return_code = nil;
- boolean cont_loop = true;
- integer sleep_step = 20;
- script_time_out = script_time_out * 1000;
-
- // while continuing is needed and while it is possible
- while (cont_loop && ((boolean) SCR::Read(.background.output_open) || (integer) SCR::Read(.background.pid) > 0)) {
- // time-out
- if (time_spent >= script_time_out) {
- y2error("Command '%1' timed-out after %2 mces", run_command, time_spent);
- cont_loop = false;
- }
-
- time_spent = time_spent + sleep_step;
- sleep(sleep_step);
- }
- y2milestone("Time spent: %1 msec", time_spent);
-
- // fetching the return code if not timed-out
- if (cont_loop) {
- script_out = (list<string>) SCR::Read(.background.newout);
- script_err = (list<string>) SCR::Read(.background.newerr);
- return_code = (integer) SCR::Read(.background.status);
- }
- SCR::Execute(.background.kill, "");
-
- map command_ret = $[
- "exit" : return_code,
- "stdout" : script_out,
- "stderr" : script_err,
- ];
- return command_ret;
- }
-
- /**
- * Returns count of services matching the pattern. Returns 'nil'
- * if something fails.
- *
- * @param string grep_pattern to match the ZYPP service
- * @return integer count of matching lines
- */
- integer CountOfZMDServicesMatching (string grep_pattern) {
- map ret = RunCommandWithTimeout(
- sformat("TERM=dumb /usr/bin/rug service-list; exit $?"),
- 60
- );
- if (ret != nil && ret["stdout"]:nil != nil) {
- list <string> matching = filter (string one_line, (list <string>) ret["stdout"]:[], {
- return regexpmatch(one_line, grep_pattern);
- });
- return size(matching);
- } else {
- y2error("Counting of services failed, returned %1", ret);
- return nil;
- }
- }
-
- /* Adds a ZYPP service into ZMD */
- boolean AddZYPPServiceIntoZMD () {
- map ret = RunCommandWithTimeout(
- "TERM=dumb /usr/bin/rug service-add --type=zypp /installation; rug subscribe zypp; exit $?",
- 60
- );
- if (ret != nil && ret["exit"]:nil == 0) {
- return true;
- } else {
- y2error("Adding ZYPP service failed, returned %1", ret);
- return false;
- }
- }
-
- /**
- * Checks whether ZMD is running, starts it when isn't. Checks whether a ZYPP source is listed
- * in the ZMD services, adds one if it is missing.
- * Everything is done via the .background agent with timeout (number in seconds).
- */
- boolean SyncYaSTInstSourceWithZMD () {
- // Notes for maintainer:
- // - using .background agent because of ZMD/rug call that can stuck
- // - using 'exit $?' that work well with ZMD/rug and .background together
- // - using TERM=dumb to suppress colors, progress bars etc. from ZMD/rug
-
- y2milestone("--- Syncing YaST inst source with ZMD ---");
- string zmd_service_name = "/etc/init.d/novell-zmd";
- string rug_command = "/usr/bin/rug";
-
- // Check the ZMD status and start if not running, using 'exit $?' because of buggy behavior '.background vs. ZMD'
- map zmd_status = RunCommandWithTimeout(sformat("TERM=dumb %1 ping 1>/dev/null; exit $?", rug_command), 60);
- y2milestone("ZMD status: %1, err: %2", zmd_status["exit"]:nil, zmd_status["stderr"]:[]);
- if (zmd_status == nil || zmd_status["exit"]:nil != 0) {
- // Starting the service
- map zmd_start = RunCommandWithTimeout(sformat("TERM=dumb %1 start; exit $?", zmd_service_name), 60);
- y2milestone("ZMD start: %1", zmd_start);
- // Checking the status after start
- map zmd_status = RunCommandWithTimeout(sformat("TERM=dumb %1 ping 1>/dev/null; exit $?", rug_command), 60);
- y2milestone("ZMD status: %1, err: %2", zmd_status["exit"]:nil, zmd_status["stderr"]:[]);
- if (zmd_status == nil || zmd_status["exit"]:nil != 0) {
- Report::Error(Message::CannotStartService(zmd_service_name));
- y2error("Cannot start service %1, returned %2", zmd_service_name, zmd_status);
- y2milestone("--- Syncing finished ---");
- return false;
- }
- }
-
- // Check whether the ZYPP service is already in zmd db or not
- integer count_of_services = CountOfZMDServicesMatching(".*ZYPP.*/installation.*");
- if (count_of_services == nil) {
- y2warning("Cannot get list of services...");
- } else if (count_of_services > 0) {
- y2milestone("ZYPP service already presented (%1)", count_of_services);
- y2milestone("--- Syncing finished ---");
- return true;
- }
-
- // Count of services were 'nil' or '0'
- if (AddZYPPServiceIntoZMD()) {
- y2milestone("Adding ZYPP service succeeded");
- } else {
- Report::Error(Message::CannotWriteSettingsTo("ZMD"));
- y2error("Adding ZYPP service failed");
- }
-
- y2milestone("--- Syncing finished ---");
- return true;
- }
-
- // adding YaST installation source into the ZMD
- // ------------------------------------------------------------------------------------------------------
-
Pkg::SetLocale (Language::language);
SlideShow::SetLanguage (Language::language);
@@ -937,10 +780,5 @@
}
}
- // Bug 156030 - YaST installation sources must be synced with ZMD
- UI::OpenDialog(`Label(_("Configuring installed system") + "..."));
- boolean sync_ret = SyncYaSTInstSourceWithZMD();
- UI::CloseDialog();
-
return result;
}
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.53/src/clients/pkg_finish.ycp new/yast2-packager-2.13.54/src/clients/pkg_finish.ycp
--- old/yast2-packager-2.13.53/src/clients/pkg_finish.ycp 2006-02-14 07:29:56.000000000 +0100
+++ new/yast2-packager-2.13.54/src/clients/pkg_finish.ycp 2006-03-28 13:42:10.000000000 +0200
@@ -7,8 +7,9 @@
*
* Authors:
* Jiri Srain
+ * Lukas Ocilka
*
- * $Id: pkg_finish.ycp 27936 2006-02-13 20:01:14Z olh $
+ * $Id: pkg_finish.ycp 29461 2006-03-28 11:42:01Z locilka $
*
*/
@@ -17,11 +18,169 @@
textdomain "packager";
import "Installation";
+import "Report";
+import "Message";
any ret = nil;
string func = "";
map param = $[];
+ // ------------------------------------------------------------------------------------------------------
+ // adding YaST installation source into the ZMD
+
+ /**
+ * Runs a bash command with timeout.
+ * @struct Returns map $[
+ * "exit" : int_return_code,
+ * "stdout" : [ "script", "stdout", "lines" ],
+ * "stderr" : [ "script", "stderr", "lines" ],
+ * ]
+ *
+ * @param string command
+ * @param integer timeout in sec.
+ * @return map with out, err and ret_code
+ */
+ map RunCommandWithTimeout (string run_command, integer script_time_out) {
+ y2milestone("Running command \"%1\" in background...", run_command);
+
+ boolean started = (boolean) SCR::Execute(.background.run_output_err, run_command);
+ if (!started) {
+ y2error("Cannot run '%1'", run_command);
+ return nil;
+ }
+
+ list<string> script_out = [];
+ list<string> script_err = [];
+ integer time_spent = 0;
+ integer return_code = nil;
+ boolean cont_loop = true;
+ integer sleep_step = 20;
+ script_time_out = script_time_out * 1000;
+
+ // while continuing is needed and while it is possible
+ while (cont_loop && ((boolean) SCR::Read(.background.output_open) || (integer) SCR::Read(.background.pid) > 0)) {
+ // time-out
+ if (time_spent >= script_time_out) {
+ y2error("Command '%1' timed-out after %2 mces", run_command, time_spent);
+ cont_loop = false;
+ }
+
+ time_spent = time_spent + sleep_step;
+ sleep(sleep_step);
+ }
+ y2milestone("Time spent: %1 msec", time_spent);
+
+ // fetching the return code if not timed-out
+ if (cont_loop) {
+ script_out = (list<string>) SCR::Read(.background.newout);
+ script_err = (list<string>) SCR::Read(.background.newerr);
+ return_code = (integer) SCR::Read(.background.status);
+ }
+ SCR::Execute(.background.kill, "");
+
+ map command_ret = $[
+ "exit" : return_code,
+ "stdout" : script_out,
+ "stderr" : script_err,
+ ];
+ return command_ret;
+ }
+
+ /**
+ * Returns count of services matching the pattern. Returns 'nil'
+ * if something fails.
+ *
+ * @param string grep_pattern to match the ZYPP service
+ * @return integer count of matching lines
+ */
+ integer CountOfZMDServicesMatching (string grep_pattern) {
+ map ret = RunCommandWithTimeout(
+ sformat("TERM=dumb /usr/bin/rug service-list; exit $?"),
+ 60
+ );
+ if (ret != nil && ret["stdout"]:nil != nil) {
+ list <string> matching = filter (string one_line, (list <string>) ret["stdout"]:[], {
+ return regexpmatch(one_line, grep_pattern);
+ });
+ return size(matching);
+ } else {
+ y2error("Counting of services failed, returned %1", ret);
+ return nil;
+ }
+ }
+
+ /* Adds a ZYPP service into ZMD */
+ boolean AddZYPPServiceIntoZMD () {
+ map ret = RunCommandWithTimeout(
+ "TERM=dumb /usr/bin/rug service-add --type=zypp /installation; rug subscribe zypp; exit $?",
+ 60
+ );
+ if (ret != nil && ret["exit"]:nil == 0) {
+ return true;
+ } else {
+ y2error("Adding ZYPP service failed, returned %1", ret);
+ return false;
+ }
+ }
+
+ /**
+ * Checks whether ZMD is running, starts it when isn't. Checks whether a ZYPP source is listed
+ * in the ZMD services, adds one if it is missing.
+ * Everything is done via the .background agent with timeout (number in seconds).
+ */
+ boolean SyncYaSTInstSourceWithZMD () {
+ // Notes for maintainer:
+ // - using .background agent because of ZMD/rug call that can stuck
+ // - using 'exit $?' that work well with ZMD/rug and .background together
+ // - using TERM=dumb to suppress colors, progress bars etc. from ZMD/rug
+
+ y2milestone("--- Syncing YaST inst source with ZMD ---");
+ string zmd_service_name = "/etc/init.d/novell-zmd";
+ string rug_command = "/usr/bin/rug";
+
+ // Check the ZMD status and start if not running, using 'exit $?' because of buggy behavior '.background vs. ZMD'
+ map zmd_status = RunCommandWithTimeout(sformat("TERM=dumb %1 ping 1>/dev/null; exit $?", rug_command), 60);
+ y2milestone("ZMD status: %1, err: %2", zmd_status["exit"]:nil, zmd_status["stderr"]:[]);
+ if (zmd_status == nil || zmd_status["exit"]:nil != 0) {
+ // Starting the service
+ map zmd_start = RunCommandWithTimeout(sformat("TERM=dumb %1 start; exit $?", zmd_service_name), 60);
+ y2milestone("ZMD start: %1", zmd_start);
+ // Checking the status after start
+ map zmd_status = RunCommandWithTimeout(sformat("TERM=dumb %1 ping 1>/dev/null; exit $?", rug_command), 60);
+ y2milestone("ZMD status: %1, err: %2", zmd_status["exit"]:nil, zmd_status["stderr"]:[]);
+ if (zmd_status == nil || zmd_status["exit"]:nil != 0) {
+ Report::Error(Message::CannotStartService(zmd_service_name));
+ y2error("Cannot start service %1, returned %2", zmd_service_name, zmd_status);
+ y2milestone("--- Syncing finished ---");
+ return false;
+ }
+ }
+
+ // Check whether the ZYPP service is already in zmd db or not
+ integer count_of_services = CountOfZMDServicesMatching(".*ZYPP.*/installation.*");
+ if (count_of_services == nil) {
+ y2warning("Cannot get list of services...");
+ } else if (count_of_services > 0) {
+ y2milestone("ZYPP service already presented (%1)", count_of_services);
+ y2milestone("--- Syncing finished ---");
+ return true;
+ }
+
+ // Count of services were 'nil' or '0'
+ if (AddZYPPServiceIntoZMD()) {
+ y2milestone("Adding ZYPP service succeeded");
+ } else {
+ Report::Error(Message::CannotWriteSettingsTo("ZMD"));
+ y2error("Adding ZYPP service failed");
+ }
+
+ y2milestone("--- Syncing finished ---");
+ return true;
+ }
+
+ // adding YaST installation source into the ZMD
+ // ------------------------------------------------------------------------------------------------------
+
/* Check arguments */
if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
func = (string)WFM::Args(0);
@@ -44,6 +203,9 @@
}
else if (func == "Write")
{
+ // Bug 156030 + 161299 - YaST installation sources must be synced with ZMD
+ boolean sync_ret = SyncYaSTInstSourceWithZMD();
+
Pkg::SourceCacheCopyTo (Installation::destdir);
// disable all sources and finish target
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.53/src/clients/test.ycp new/yast2-packager-2.13.54/src/clients/test.ycp
--- old/yast2-packager-2.13.53/src/clients/test.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-2.13.54/src/clients/test.ycp 2006-03-27 15:55:00.000000000 +0200
@@ -0,0 +1,156 @@
+{
+ textdomain "packager";
+ import "Service";
+ import "Message";
+
+ /**
+ * Runs a bash command with timeout.
+ * @struct Returns map $[
+ * "exit" : int_return_code,
+ * "stdout" : [ "script", "stdout", "lines" ],
+ * "stderr" : [ "script", "stderr", "lines" ],
+ * ]
+ *
+ * @param string command
+ * @param integer timeout in sec.
+ * @return map with out, err and ret_code
+ */
+ map RunCommandWithTimeout (string run_command, integer script_time_out) {
+ y2milestone("Running command \"%1\" in background...", run_command);
+
+ boolean started = (boolean) SCR::Execute(.background.run_output_err, run_command);
+ if (!started) {
+ y2error("Cannot run '%1'", run_command);
+ return nil;
+ }
+
+ list<string> script_out = [];
+ list<string> script_err = [];
+ integer time_spent = 0;
+ integer return_code = nil;
+ boolean cont_loop = true;
+ integer sleep_step = 20;
+ script_time_out = script_time_out * 1000;
+
+ // while continuing is needed and while it is possible
+ while (cont_loop && ((boolean) SCR::Read(.background.output_open) || (integer) SCR::Read(.background.pid) > 0)) {
+ // time-out
+ if (time_spent >= script_time_out) {
+ y2error("Command '%1' timed-out after %2 mces", run_command, time_spent);
+ cont_loop = false;
+ }
+
+ time_spent = time_spent + sleep_step;
+ sleep(sleep_step);
+ }
+ y2milestone("Time spent: %1 msec", time_spent);
+
+ // fetching the return code if not timed-out
+ if (cont_loop) {
+ script_out = (list<string>) SCR::Read(.background.newout);
+ script_err = (list<string>) SCR::Read(.background.newerr);
+ return_code = (integer) SCR::Read(.background.status);
+ }
+ SCR::Execute(.background.kill, "");
+
+ map command_ret = $[
+ "exit" : return_code,
+ "stdout" : script_out,
+ "stderr" : script_err,
+ ];
+ return command_ret;
+ }
+
+ /**
+ * Returns count of services matching the pattern. Returns 'nil'
+ * if something fails.
+ *
+ * @param string grep_pattern to match the ZYPP service
+ * @return integer count of matching lines
+ */
+ integer CountOfZMDServicesMatching (string grep_pattern) {
+ map ret = RunCommandWithTimeout(
+ sformat("TERM=dumb /usr/bin/rug service-list; exit $?"),
+ 60
+ );
+ if (ret != nil && ret["stdout"]:nil != nil) {
+ list <string> matching = filter (string one_line, (list <string>) ret["stdout"]:[], {
+ return regexpmatch(one_line, grep_pattern);
+ });
+ return size(matching);
+ } else {
+ y2error("Counting of services failed, returned %1", ret);
+ return nil;
+ }
+ }
+
+ /* Adds a ZYPP service into ZMD */
+ boolean AddZYPPServiceIntoZMD () {
+ map ret = RunCommandWithTimeout(
+ "TERM=dumb /usr/bin/rug service-add --type=zypp /installation; rug subscribe zypp; exit $?",
+ 60
+ );
+ if (ret != nil && ret["exit"]:nil == 0) {
+ return true;
+ } else {
+ y2error("Adding ZYPP service failed, returned %1", ret);
+ return false;
+ }
+ }
+
+ /**
+ * Checks whether ZMD is running, starts it when isn't. Checks whether a ZYPP source is listed
+ * in the ZMD services, adds one if it is missing.
+ * Everything is done via the .background agent with timeout (number in seconds).
+ */
+ boolean SyncYaSTInstSourceWithZMD () {
+ // Notes for maintainer:
+ // - using .background agent because of ZMD/rug call that can stuck
+ // - using 'exit $?' that work well with ZMD/rug and .background together
+ // - using TERM=dumb to suppress colors, progress bars etc. from ZMD/rug
+
+ y2milestone("--- Syncing YaST inst source with ZMD ---");
+ string zmd_service_name = "/etc/init.d/novell-zmd";
+ string rug_command = "/usr/bin/rug";
+
+ // Check the ZMD status and start if not running, using 'exit $?' because of buggy behavior '.background vs. ZMD'
+ map zmd_status = RunCommandWithTimeout(sformat("TERM=dumb %1 ping 1>/dev/null; exit $?", rug_command), 60);
+ y2milestone("ZMD status: %1, err: %2", zmd_status["exit"]:nil, zmd_status["stderr"]:[]);
+ if (zmd_status == nil || zmd_status["exit"]:nil != 0) {
+ // Starting the service
+ map zmd_start = RunCommandWithTimeout(sformat("TERM=dumb %1 start; exit $?", zmd_service_name), 60);
+ y2milestone("ZMD start: %1", zmd_start);
+ // Checking the status after start
+ map zmd_status = RunCommandWithTimeout(sformat("TERM=dumb %1 ping 1>/dev/null; exit $?", rug_command), 60);
+ y2milestone("ZMD status: %1, err: %2", zmd_status["exit"]:nil, zmd_status["stderr"]:[]);
+ if (zmd_status == nil || zmd_status["exit"]:nil != 0) {
+ Message::CannotStartService(zmd_service_name);
+ y2error("Cannot start service %1, returned %2", zmd_service_name, zmd_status);
+ y2milestone("--- Syncing finished ---");
+ return false;
+ }
+ }
+
+ // Check whether the ZYPP service is already in zmd db or not
+ integer count_of_services = CountOfZMDServicesMatching(".*ZYPP.*/installation.*");
+ if (count_of_services == nil) {
+ y2warning("Cannot get list of services...");
+ } else if (count_of_services > 0) {
+ y2milestone("ZYPP service already presented (%1)", count_of_services);
+ y2milestone("--- Syncing finished ---");
+ return true;
+ }
+
+ // Count of services were 'nil' or '0'
+ if (AddZYPPServiceIntoZMD()) {
+ y2milestone("Adding ZYPP service succeeded");
+ } else {
+ y2error("Adding ZYPP service failed");
+ }
+
+ y2milestone("--- Syncing finished ---");
+ return true;
+ }
+
+ SyncYaSTInstSourceWithZMD();
+}
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.53/src/modules/SignatureCheckDialogs.ycp new/yast2-packager-2.13.54/src/modules/SignatureCheckDialogs.ycp
--- old/yast2-packager-2.13.53/src/modules/SignatureCheckDialogs.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-2.13.54/src/modules/SignatureCheckDialogs.ycp 2006-03-28 17:31:05.000000000 +0200
@@ -0,0 +1,387 @@
+/**
+ * Module: SignatureCheckDialogs.ycp
+ * Authors: Lukas Ocilka
+ *
+ * Dialogs handling for RPM/Source GPM signatures.
+ *
+ * $Id: SignatureCheckDialogs.ycp 28363 2006-02-24 12:27:15Z locilka $
+ */
+
+{
+ textdomain "packager";
+
+ module "SignatureCheckDialogs";
+
+ import "Label";
+ import "Popup";
+
+ // Defining icons for dialogs
+ term error_icon = `Empty();
+ term warning_icon = `Empty();
+ term question_icon = `Empty();
+
+// TODO: support icons
+// /**
+// * Module constructor
+// */
+// global void InitDialogs () {
+// map ui_capabilities = UI::GetDisplayInfo();
+// if (ui_capabilities["HasLocalImageSupport"]:false) {
+// error_icon = `HBox(`Image("error", ""), `HSpacing(1));
+// warning_icon = `HBox(`Image("warning", ""), `HSpacing(1));
+// question_icon = `HBox(`Image("question", ""), `HSpacing(1));
+// }
+// }
+
+ /**
+ * Returns term of yes/no buttons
+ *
+ * @param symbol default button `yes or `no
+ * @return term with buttons
+ */
+ term YesNoButtons (symbol default_button) {
+ term yes_button = `PushButton(`id(`yes), Label::YesButton());
+ term no_button = `PushButton(`id(`no), Label::NoButton());
+
+ if (default_button == `yes) {
+ yes_button = `PushButton(`id(`yes), `opt(`default), Label::YesButton());
+ } else {
+ no_button = `PushButton(`id(`no), `opt(`default), Label::NoButton());
+ }
+
+ return `HBox (
+ yes_button,
+ `HSpacing(2),
+ no_button
+ );
+ }
+
+ /**
+ * Returns 'true' (yes), 'false' (no) or 'nil' (cancel)
+ *
+ * @return boolean user input yes==true
+ */
+ boolean WaitForYesNoCancelUserInput() {
+ any user_input = nil;
+ boolean ret = nil;
+
+ while (true) {
+ user_input = UI::UserInput();
+ // yes button
+ if (user_input == `yes) {
+ ret = true;
+ break;
+ // no button
+ } else if (user_input == `no) {
+ ret = false;
+ break;
+ // closing window uisng [x]
+ } else if (user_input == `cancel) {
+ ret = nil;
+ break;
+ } else {
+ y2error("Unknown user input: '%1'", user_input);
+ continue;
+ }
+ }
+
+ return ret;
+ }
+
+ /**
+ * Waits for user input and checks it agains accepted symbols.
+ * Returns the default symbol in case of `cancel (user closes the dialog).
+ *
+ * @param list <symbol> of accepted symbol by UserInput
+ * @param symbol default return for case of `cancel
+ */
+ symbol WaitForSymbolUserInput (list <symbol> list_of_accepted, symbol default_symb) {
+ symbol user_input = nil;
+ symbol ret = nil;
+
+ while (true) {
+ user_input = (symbol) UI::UserInput();
+ if (contains(list_of_accepted, user_input)) {
+ ret = user_input;
+ break;
+ } else if (user_input == `cancel) {
+ ret = default_symb;
+ break;
+ } else {
+ y2error("Unknown user input: '%1'", user_input);
+ continue;
+ }
+ }
+
+ return ret;
+ }
+
+ /**
+ * Used for unsiged file or package. Opens dialog asking whether user wants
+ * to use this unsigned item.
+ *
+ * @param symbol item_type `file or `package
+ * @param string item_name file name or package name
+ * @return boolean use or don't use ('true' if 'yes')
+ */
+ global boolean UseUnsignedItem (symbol item_type, string item_name) {
+ string description_text = sformat((item_type == `package ?
+ // popup question, %1 stands for the package name
+ _("The package '%1' is not digitally signed. This means that the origin
+of the integrity of the package can not be verified. Installing the package
+may put the integrity of your system at risk.
+
+Do you want to install it anyway?")
+ :
+ // popup question, %1 stands for the filename
+ _("The file '%1' is not digitally signed. This means that the origin
+of the integrity of the file can not be verified. Using the file
+may put the integrity of your system at risk.
+
+Do you want to use it anyway?")
+ ), item_name);
+
+ UI::OpenDialog(
+ `opt(`decorated),
+ `VBox(
+ `HBox (
+ `VCenter(warning_icon),
+ // popup heading
+ `VCenter(`Heading( _("Signature Check Failed"))),
+ `HStretch()
+ ),
+ `Label(description_text),
+ YesNoButtons(`no)
+ )
+ );
+
+ boolean ret = WaitForYesNoCancelUserInput();
+ // default value
+ if (ret == nil) ret = false;
+
+ UI::CloseDialog();
+ return ret;
+ }
+
+ /**
+ * Used for corrupted file or package. Opens dialog asking whether user wants
+ * to use this corrupted item.
+ *
+ * @param symbol item_type `file or `package
+ * @param string item_name file name or package name
+ * @return boolean use or don't use ('true' if 'yes')
+ */
+ global boolean UseCorruptedItem (symbol item_type, string item_name) {
+ string description_text = sformat((item_type == `package ?
+ // popup question, %1 stands for the package name
+ _("The integrity check for package '%1' failed. This means that
+the package has been changed by accident or by an attacker
+since the repository creator has signed it. Installing it
+is a big risk for the integrity and security of your system.
+
+Do you want to install it anyway?")
+ :
+ // popup question, %1 stands for the filename
+ _("The integrity check for file '%1' failed. This means that
+the file has been changed by accident or by an attacker
+since the repository creator has signed it. Installing it
+is a big risk for the integrity and security of your system.
+
+Do you want to use it anyway?")
+ ), item_name);
+
+ UI::OpenDialog(
+ `opt(`decorated),
+ `VBox(
+ // popup heading
+ `HBox (
+ `VCenter(error_icon),
+ `VCenter(`Heading( _("Validation Check Failed"))),
+ `HStretch()
+ ),
+ `Label(description_text),
+ YesNoButtons(`no)
+ )
+ );
+
+ boolean ret = WaitForYesNoCancelUserInput();
+ // default value
+ if (ret == nil) ret = false;
+
+ UI::CloseDialog();
+ return ret;
+ }
+
+ /**
+ * Used for file or package signed by unknown key.
+ *
+ * @param symbol item_type `file or `package
+ * @param string item_name file name or package name
+ * @param string key_id
+ * @return symbol `yes, `no or `retry
+ */
+ global symbol ItemSignedWithUnknownSignature (symbol item_type, string item_name, string key_id) {
+ string description_text = sformat((item_type == `package ?
+ // popup question, %1 stands for the package name, %2 for the key ID
+ _("The package '%1' is digitally signed with an unknown GnuPG key '%2'
+and we cannot find that key. This means that a trust relationship to the creator of the package
+can not be established. Installing the package may put the integrity of your system at risk.
+
+Do you want to install it anyway?")
+ :
+ // popup question, %1 stands for the filename, %2 for the key ID
+ _("The file '%1' is digitally signed with an unknown GnuPG key '%2'
+and we cannot find that key. This means that a trust relationship to the creator of the file
+can not be established. Using the file may put the integrity of your system at risk.
+
+Do you want to use it anyway?")
+ ), item_name, key_id);
+
+ UI::OpenDialog(
+ `opt(`decorated),
+ `VBox(
+ `HBox (
+ `VCenter(warning_icon),
+ // popup heading
+ `VCenter(`Heading( _("Uknown GnuPG Key"))),
+ `HStretch()
+ ),
+ `Label(description_text),
+ YesNoButtons(`no)
+ )
+ );
+
+ // This will optionally offer to retrieve the key from gpg keyservers
+ // That's why it returns 'symbol' instead of 'boolean'
+ // But by now it only handles yes/no/cancel
+ symbol ret = (WaitForYesNoCancelUserInput() == true ? `yes : `no);
+ // default value
+ if (ret == nil) ret = `no;
+
+ UI::CloseDialog();
+ return ret;
+ }
+
+ /**
+ * Used for file or package signed by a public key. This key is still
+ * not listed in trusted keys.
+ *
+ * @param symbol item_type `file or `package
+ * @param string item_name file name or package name
+ * @param string key_id
+ * @param string key_name
+ * @return symbol `key_import, `install, `skip
+ */
+ global symbol ItemSignedWithPublicSignature (symbol item_type, string item_name, string key_id, string key_name) {
+ string description_text = sformat((item_type == `package ?
+ // popup question, %1 stands for the package name
+ _("The package '%1' is digitally signed
+with key '%2 (%3)'.
+There is no trust relationship to the owner of the key. You may chose to import
+the key into your set of trusted keys in the Import dialog and then proceed
+with the installation. You can also chose just to install the package anyway,
+but be aware that packages from untrusted sources can put the integrity
+of your system at risk.")
+ :
+ // popup question, %1 stands for the filename
+ _("The file '%1' is digitally signed
+with key '%2 (%3)'.
+There is no trust relationship to the owner of the key. You may chose to import
+the key into your set of trusted keys in the Import dialog and then proceed
+with the installation. You can also chose just to use the file anyway,
+but be aware that packages from untrusted sources can put the integrity
+of your system at risk.")
+ ), item_name, key_id, key_name);
+
+ UI::OpenDialog(
+ `opt(`decorated),
+ `VBox(
+ `HBox (
+ `VCenter(warning_icon),
+ // popup heading
+ `VCenter(`Heading( _("Signed with Untrusted Public Key"))),
+ `HStretch()
+ ),
+ `Label(description_text),
+ `HBox (
+ // push button
+ `PushButton(`id(`key_import), _("Key &Import Dialog")),
+ // push button
+ `PushButton(`id(`install), _("Install &Anyway")),
+ // push button
+ `PushButton(`id(`skip), _("&Skip Package"))
+ )
+ )
+ );
+ UI::SetFocus(`skip);
+
+ // wait for one of listed ID's, return the default value in case of `cancel
+ symbol ret = WaitForSymbolUserInput([`key_import, `install, `skip], `skip);
+
+ UI::CloseDialog();
+ return ret;
+ }
+
+ /**
+ * ImportGPGKeyDialog
+ *
+ * @param string key_id
+ * @param string key_name
+ * @param string key_location
+ * @param string key_detailed_description
+ * @return symbol
+ */
+ global symbol ImportGPGKeyDialog (string key_id, string key_name, string key_location, string key_detailed_description) {
+ // FIXME: add somewhere this additional text
+ // additional warning text (kind of help)
+ string warning_text = sformat(_("The owner of the key may distribute updates, packages and package repositories
+that will be considered trusted by your system and which will be offered for installation
+and update without any further warning. Importing the key thus allows the key owner
+to have a certain amount of control over the software on your system and you should
+only do this if you trust her/him. YaST comes up with a warning dialog for every
+package that's not signed by a trusted (imported) key; this will happen to packages
+by the package creator with key '%1' if you chose not to import."), key_id);
+
+ UI::OpenDialog(
+ `opt(`decorated),
+ `VBox(
+ `HBox (
+ `VCenter(question_icon),
+ // popup heading
+ `VCenter(`Heading(_("Import Public GnuPG Key"))),
+ `HStretch()
+ ),
+ `Label(sformat(
+ // popup message, %1 stands for GPG key ID, %2 for key name, %3 for key location (URL or ...)
+ _("The GnuPG key '%1 (%2)' has been found
+on location '%3'.
+
+You can chose to import it into your keyring of trusted public keys - that means
+you trust the owner of the key. You should be sure that you can trust the owner
+and that the key really belongs to that owner before considering to import it."),
+ key_id, key_name, key_location
+ )),
+ `HBox (
+ // push button
+ `PushButton(`id(`import), _("&Import")),
+ // push button
+ `PushButton(`id(`details), _("&Details")),
+ // push button
+ `PushButton(`id(`dont_import), _("Do &Not Import"))
+ )
+ )
+ );
+ UI::SetFocus(`details);
+
+ symbol ret = nil;
+ while (ret == nil || ret == `details) {
+ // wait for one of listed ID's, return the default value in case of `cancel
+ ret = WaitForSymbolUserInput([`import, `details, `dont_import], `dont_import);
+ if (contains([`import, `dont_import], ret)) break;
+ else if (ret == `details) Popup::LongMessage(key_detailed_description);
+ }
+
+ UI::CloseDialog();
+ return ret;
+ }
+}
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.53/src/modules/SourceManager.ycp new/yast2-packager-2.13.54/src/modules/SourceManager.ycp
--- old/yast2-packager-2.13.53/src/modules/SourceManager.ycp 2006-03-02 09:44:42.000000000 +0100
+++ new/yast2-packager-2.13.54/src/modules/SourceManager.ycp 2006-03-28 15:51:57.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Anas Nashif
* Status: Work in Progress
*
- * $Id: SourceManager.ycp 28410 2006-02-27 15:47:13Z jsrain $
+ * $Id: SourceManager.ycp 29470 2006-03-28 12:11:22Z visnov $
*
* Representation of the configuration of source-manager.
* Input and output routines.
@@ -576,7 +576,8 @@
string color = source[ "enabled" ]:true ? "#006600" : "#FF0000";
sitem = sitem + HTML::Colorize("["+status+"] ",
color);
- sitem = sitem + productData[ "label" ]:"unknown";
+ // translators: name of a source if no other idenfication found
+ sitem = sitem + productData[ "label" ]:generalData["type"]:_("unknown");
sitem = sitem + " ( " + generalData[ "url" ]:"" + ")";
return sitem;
}
@@ -598,7 +599,7 @@
? _("On")
// corresponds to the "Enable/Disable" button
: _("Off"),
- productData[ "label" ]:"unknown",
+ productData[ "label" ]:generalData["type"]:_("Unknown"),
generalData[ "url" ]:""
);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...