Hello community,
here is the log from the commit of package yast2-installation
checked in at Tue Dec 12 02:30:14 CET 2006.
--------
--- yast2-installation/yast2-installation.changes 2006-12-07 11:20:39.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes 2006-12-11 16:16:39.000000000 +0100
@@ -1,0 +2,18 @@
+Mon Dec 11 16:11:21 CET 2006 - locilka@suse.cz
+
+- Handling new flag REGISTERPRODUCT from add-on product content
+ file. This flag demands running the registration client after
+ an add-on product is installed (on a running system) and demands
+ running the registration client even if it is disabled in
+ the base-product's control file (during installation)
+ (FATE #301312).
+- 2.15.2
+
+-------------------------------------------------------------------
+Thu Dec 7 18:28:21 CET 2006 - locilka@suse.cz
+
+- Release Notes dialog in the second stage installation now offers
+ to select a different language for release notes than the default
+ one (#224875).
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-2.15.1.tar.bz2
New:
----
yast2-installation-2.15.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.gxQ8hB/_old 2006-12-12 02:29:55.000000000 +0100
+++ /var/tmp/diff_new_pack.gxQ8hB/_new 2006-12-12 02:29:55.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-installation (Version 2.15.1)
+# spec file for package yast2-installation (Version 2.15.2)
#
# 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-installation
-Version: 2.15.1
+Version: 2.15.2
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-installation-2.15.1.tar.bz2
+Source0: yast2-installation-2.15.2.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files yast2 yast2-core-devel yast2-country yast2-devtools yast2-testsuite
Requires: yast2-slp yast2-firewall
@@ -69,7 +69,7 @@
Jiri Srain
%prep
-%setup -n yast2-installation-2.15.1
+%setup -n yast2-installation-2.15.2
%build
%{prefix}/bin/y2tool y2autoconf
@@ -133,6 +133,18 @@
%endif
%changelog -n yast2-installation
+* Mon Dec 11 2006 - locilka@suse.cz
+- Handling new flag REGISTERPRODUCT from add-on product content
+ file. This flag demands running the registration client after
+ an add-on product is installed (on a running system) and demands
+ running the registration client even if it is disabled in
+ the base-product's control file (during installation)
+ (FATE #301312).
+- 2.15.2
+* Thu Dec 07 2006 - locilka@suse.cz
+- Release Notes dialog in the second stage installation now offers
+ to select a different language for release notes than the default
+ one (#224875).
* Thu Dec 07 2006 - locilka@suse.cz
- Reworked adding and removing Add-Ons during the first stage
installation. If some Add-Ons are added or removed, the entire
++++++ yast2-installation-2.15.1.tar.bz2 -> yast2-installation-2.15.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/VERSION new/yast2-installation-2.15.2/VERSION
--- old/yast2-installation-2.15.1/VERSION 2006-12-07 10:59:32.000000000 +0100
+++ new/yast2-installation-2.15.2/VERSION 2006-12-11 16:11:07.000000000 +0100
@@ -1 +1 @@
-2.15.1
+2.15.2
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/configure new/yast2-installation-2.15.2/configure
--- old/yast2-installation-2.15.1/configure 2006-12-07 11:24:28.000000000 +0100
+++ new/yast2-installation-2.15.2/configure 2006-12-11 16:25:41.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-installation 2.15.1.
+# Generated by GNU Autoconf 2.60 for yast2-installation 2.15.2.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-installation'
PACKAGE_TARNAME='yast2-installation'
-PACKAGE_VERSION='2.15.1'
-PACKAGE_STRING='yast2-installation 2.15.1'
+PACKAGE_VERSION='2.15.2'
+PACKAGE_STRING='yast2-installation 2.15.2'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1192,7 +1192,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-installation 2.15.1 to adapt to many kinds of systems.
+\`configure' configures yast2-installation 2.15.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1263,7 +1263,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-installation 2.15.1:";;
+ short | recursive ) echo "Configuration of yast2-installation 2.15.2:";;
esac
cat <<\_ACEOF
@@ -1341,7 +1341,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-installation configure 2.15.1
+yast2-installation configure 2.15.2
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1355,7 +1355,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-installation $as_me 2.15.1, which was
+It was created by yast2-installation $as_me 2.15.2, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2156,7 +2156,7 @@
# Define the identity of the package.
PACKAGE='yast2-installation'
- VERSION='2.15.1'
+ VERSION='2.15.2'
cat >>confdefs.h <<_ACEOF
@@ -2383,7 +2383,7 @@
-VERSION="2.15.1"
+VERSION="2.15.2"
RPMNAME="yast2-installation"
MAINTAINER="Lukas Ocilka "
@@ -3512,7 +3512,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-installation $as_me 2.15.1, which was
+This file was extended by yast2-installation $as_me 2.15.2, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3555,7 +3555,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-installation config.status 2.15.1
+yast2-installation config.status 2.15.2
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/configure.in new/yast2-installation-2.15.2/configure.in
--- old/yast2-installation-2.15.1/configure.in 2006-12-07 11:24:23.000000000 +0100
+++ new/yast2-installation-2.15.2/configure.in 2006-12-11 16:25:36.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-installation, 2.15.1, http://bugs.opensuse.org/, yast2-installation)
+AC_INIT(yast2-installation, 2.15.2, http://bugs.opensuse.org/, yast2-installation)
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.15.1"
+VERSION="2.15.2"
RPMNAME="yast2-installation"
MAINTAINER="Lukas Ocilka "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/src/clients/inst_release_notes.ycp new/yast2-installation-2.15.2/src/clients/inst_release_notes.ycp
--- old/yast2-installation-2.15.1/src/clients/inst_release_notes.ycp 2006-11-29 15:47:32.000000000 +0100
+++ new/yast2-installation-2.15.2/src/clients/inst_release_notes.ycp 2006-12-07 18:32:08.000000000 +0100
@@ -7,7 +7,7 @@
*
* Display release notes.
*
- * $Id: inst_release_notes.ycp 33279 2006-10-09 14:16:49Z locilka $
+ * $Id: inst_release_notes.ycp 34857 2006-12-07 17:32:05Z locilka $
*/
{
@@ -23,46 +23,135 @@
map argmap = GetInstArgs::argmap();
+ integer minwidtprodsel = 0;
list<string> relnotesproducts = [];
- list<string> readproducts = [];
+
map relnotesmap = $[];
- list<string> default_patterns = ["RELEASE-NOTES.%1.rtf"];
- list<string> patterns = argmap["patterns"]:default_patterns;
- string basedirectory = argmap["directory"]:"/usr/share/doc/release-notes";
+ string basedirectory = "/usr/share/doc/release-notes";
string directory="";
integer prodnamelen=0;
+ map CreateLanguagesTranslations () {
+ map ret = $[];
+ map all_languages = Language::GetLanguagesMap(false);
+ foreach (string short, list translations, all_languages, {
+ string translation = nil;
+ if (translations[4]:"" != "") translation = translations[4]:"";
+ else if (translations[1]:"" != "") translation = translations[1]:"";
+ else if (translations[0]:"" != "") translation = translations[0]:"";
+
+ ret[short] = translation;
+
+ // fallback for short names without xx_YY
+ if (regexpmatch(short, "_")) {
+ short = regexpsub(short, "^(.*)_.*$", "\\1");
+ if (ret[short]:nil == nil) ret[short] = translation;
+ }
+ });
+
+ // exceptions
+ if (ret["en"]:nil != nil && ret["en_US"]:nil != nil) ret["en"] = ret["en_US"]:"";
+ if (ret["zh"]:nil != nil && ret["zh_CN"]:nil != nil) ret["zh"] = ret["zh_CN"]:"";
+ if (ret["pt"]:nil != nil && ret["pt_PT"]:nil != nil) ret["pt"] = ret["pt_PT"]:"";
+
+ return ret;
+ }
+
+ // --- //
+
if (argmap["directory"]:"" != "")
basedirectory = Directory::custom_workflow_dir + basedirectory;
+ list<string> readproducts = [];
readproducts = (list<string>) SCR::Read(.target.dir, basedirectory);
- foreach ( string product, readproducts ,
- {
+ map languages_translations = CreateLanguagesTranslations();
+ map languages_of_relnotes = $[];
+
+ list <string> preferred_langs = [
+ Language::language,
+ substring (Language::language, 0, 2),
+ "en_US",
+ "en_GB",
+ "en"
+ ];
+
+ map minwidthlang = $[];
+
+ map cleanproduct_product = $[];
+ // Creating term `ComboBox with languages for every single product
+ foreach ( string product, readproducts, {
// beautify product string
string cleanproduct = mergestring(splitstring(product, "_"), " ");
- relnotesproducts = add (relnotesproducts, cleanproduct );
+ relnotesproducts = add (relnotesproducts, cleanproduct);
+ if (minwidtprodsel < size (cleanproduct))
+ minwidtprodsel = size (cleanproduct);
+ cleanproduct_product[cleanproduct] = product;
+
prodnamelen=prodnamelen + size(cleanproduct);
// read release notes
- string directory = basedirectory + "/" + product;
- map relnotes = CustomDialogs::load_file_locale(patterns, directory, Language::language);
-
- // add release notes to map
- relnotesmap[cleanproduct] = (string) relnotes["text"]:"";
+ string directory = basedirectory + "/" + product + "/";
- /* filename of release notes */
- //string file = relnotes["file"]:"";
- /* release notes */
- // string text = relnotes["text"]:"";
+ list <string> relnotest_list = (list <string>) SCR::Read (.target.dir, directory);
+ relnotest_list = filter (string one_relnotes, relnotest_list, {
+ return regexpmatch (one_relnotes, "^RELEASE-NOTES\..*\.rtf$");
+ });
+
+ list <term> combobox_items = [];
+ foreach (string one_relnotes, relnotest_list, {
+ string relnotes_lang = regexpsub (one_relnotes, "^RELEASE-NOTES\.(.*)\.rtf$", "\\1");
+ string lang_name = languages_translations[relnotes_lang]:"";
+ // combobox item
+ if (lang_name == nil || lang_name == "") lang_name = sformat (_("Language: %1"), relnotes_lang);
+
+ // set minimal width (maximal length of language name)
+ if (minwidthlang[product]:0 < size (lang_name))
+ minwidthlang[product] = size (lang_name);
+
+ combobox_items = add (combobox_items,
+ `item (`id (sformat ("%1%2", directory, one_relnotes)), lang_name)
+ );
+ });
+
+ // Selecting default language
+ string item_id = nil;
+ boolean preferred_found = false;
+ foreach (string preffered_lang, preferred_langs, {
+ integer conter = -1;
+ foreach (term one_item, combobox_items, {
+ conter = conter + 1;
+ string item_id = one_item[0,0]:"";
+
+ if (regexpmatch (item_id, sformat ("RELEASE-NOTES\.%1\.rtf$", preffered_lang))) {
+ preferred_found = true;
+ break;
+ }
+ });
+
+ if (preferred_found) {
+ combobox_items[conter] = add (combobox_items[conter]:`item(`id(nil), nil), true);
+ break;
+ }
+ });
+
+ languages_of_relnotes[product] = sort (term a, term b, combobox_items, ``( a[1]:"" < b[1]:"" ));
});
-
+
/* caption for dialog "Release Notes" */
string caption = _("Release Notes");
- term relnoteslayout=nil;
- term relnotesrichtext=`RichText(`id(`relnotescontent),
- relnotesmap[relnotesproducts[0]:""]:"Select product" );
+ term relnoteslayout = nil;
+ term relnotesscreen = `VBox (
+ // combobox
+ `Left (
+ `ReplacePoint (
+ `id(`lang_rp),
+ `ComboBox (`id (`lang), `opt (`notify), _("&Language"), [])
+ )
+ ),
+ `RichText (`id (`relnotescontent), "")
+ );
// use DumpTab or ComboBox layout
if ( UI::HasSpecialWidget(`DumbTab ) && (
@@ -70,15 +159,23 @@
( size(relnotesproducts)>3 && prodnamelen<70 ) )
)
{
- relnoteslayout= `DumbTab ( relnotesproducts , relnotesrichtext );
+ relnoteslayout = `DumbTab (relnotesproducts, relnotesscreen);
}
else
{
- relnoteslayout=`VBox( `Left( `ComboBox(`id(`productsel), `opt(`notify), _("&Product"), relnotesproducts)),
- relnotesrichtext );
+ relnoteslayout = `VBox (
+ `Left (
+ `MinWidth (
+ // +2 thingies on the right
+ minwidtprodsel + 2,
+ `ComboBox (`id(`productsel), `opt(`notify), _("&Product"), relnotesproducts)
+ )
+ ),
+ relnotesscreen
+ );
}
- term contents = `VBox ( `VSpacing (0.5), relnoteslayout, `VSpacing (0.5));
+ term contents = `VBox (`VSpacing (0.5), relnoteslayout, `VSpacing (0.5));
/* help text for dialog "Release Notes" */
string help = _("<p>Here are the <b>release notes</b> for the installed
@@ -91,39 +188,69 @@
GetInstArgs::enable_next());
Wizard::SetTitleIcon("yast-release-notes");
- // FIXME: richtext eats return key, but only in NCurses and we want to
- // make users read release notes (and make PgDn work). For Next, F10 is
- // availbale
- UI::SetFocus (`id (`relnotescontent));
+ // Default settings
+ UI::ChangeWidget (`id(`lang), `Enabled, false);
+ if (UI::WidgetExists(`productsel) && (size(relnotesproducts) < 2))
+ UI::ChangeWidget (`id(`productsel), `Enabled, false);
+
+ void RedrawRelnotesLang (string use_file) {
+ string contents = (string) SCR::Read (.target.string, use_file);
+ if (contents == nil || contents == "") {
+ y2error ("Wrong relnotesfile: %1", use_file);
+ } else {
+ UI::ChangeWidget (`id(`relnotescontent), `Value, contents);
+ }
+
+ UI::SetFocus (`id (`relnotescontent));
+ }
+
+ void RedrawRelnotesProduct (symbol redraw_type, any current_ret) {
+ if (redraw_type == `tab) {
+ string product = cleanproduct_product[tostring(current_ret)]:"";
+
+ UI::ReplaceWidget (
+ `id (`lang_rp),
+ `MinWidth (
+ // +2 for thingies on the right
+ minwidthlang[product]:16 + 2,
+ `ComboBox (`id (`lang), `opt (`notify), _("&Language"), languages_of_relnotes[product]:[])
+ )
+ );
+ if (size(languages_of_relnotes[product]:[]) > 1)
+ UI::ChangeWidget (`id (`lang), `Enabled, true);
+ else
+ UI::ChangeWidget (`id (`lang), `Enabled, false);
+ }
+
+ RedrawRelnotesLang ((string) UI::QueryWidget (`id (`lang), `Value));
+ }
// for debugging
// UI::DumpWidgetTree();
+ // Init the first product
+ RedrawRelnotesProduct (`tab, relnotesproducts[0]:"");
+
any ret = nil;
repeat {
ret = Wizard::UserInput();
- if (ret == `abort)
- {
+ if (ret == `abort) {
if (Mode::normal()) break;
if (Popup::ConfirmAbort (`incomplete))
break;
- }
- else if (ret == `help)
- {
+ } else if (ret == `help) {
Wizard::ShowHelp (help);
- }
- else if ( ret == `productsel )
- {
- UI::ChangeWidget(`relnotescontent, `Value, relnotesmap[ (string) UI::QueryWidget(`id(`productsel), `Value) ]:"" );
- UI::SetFocus (`id (`relnotescontent));
- }
- else if ( is( ret, string ) )
- {
- UI::ChangeWidget(`relnotescontent, `Value, relnotesmap[(string) ret]:"");
- UI::SetFocus (`id (`relnotescontent));
+ // using combobox for products
+ } else if (ret == `productsel) {
+ RedrawRelnotesProduct (`tab, (string) UI::QueryWidget (`id (`productsel), `Value));
+ } else if (ret == `lang) {
+ RedrawRelnotesLang ((string) UI::QueryWidget (`id (`lang), `Value));
+ // using tabs for products
+ } else if (is (ret, string)) {
+ RedrawRelnotesProduct (`tab, ret);
}
} until ( ret == `next || ret == `back );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/src/include/add-on-workflow.ycp new/yast2-installation-2.15.2/src/include/add-on-workflow.ycp
--- old/yast2-installation-2.15.1/src/include/add-on-workflow.ycp 2006-12-07 10:07:09.000000000 +0100
+++ new/yast2-installation-2.15.2/src/include/add-on-workflow.ycp 2006-12-11 16:10:10.000000000 +0100
@@ -353,6 +353,7 @@
{
// error report
Report::Error (_("Failed to initialize the catalog."));
+ AddOnProduct::ClearRegistrationRequest (src_id);
return `finish;
}
/*
@@ -461,6 +462,7 @@
{
// error report
Report::Error (_("Failed to initialize the catalog."));
+ AddOnProduct::ClearRegistrationRequest (selected);
return `finish;
}
@@ -536,6 +538,7 @@
or selected for installation."));
y2milestone ("Deleting installatino source %1", AddOnProduct::src_id);
Pkg::SourceDelete (AddOnProduct::src_id);
+ AddOnProduct::ClearRegistrationRequest (AddOnProduct::src_id);
return `finish;
}
// Display /media.1/info.txt if such file exists
@@ -870,18 +873,25 @@
// remove a temporary file, not needed anymore
AddOnProduct::RemoveAddOnControlFile (selected);
some_addon_changed = true;
+ // remove product from list of product to register (FATE #301312)
+ AddOnProduct::RemoveRegistrationFlag (media);
Redraw (enable_back, enable_next);
// adding new add-on
} else if (ret == `add) {
symbol ret = RunWizard ();
- if (ret == `next) some_addon_changed = true;
+ if (ret == `next) {
+ // check whether it requests registration (FATE #301312)
+ AddOnProduct::PrepareForRegistration (AddOnProduct::src_id);
+ some_addon_changed = true;
+ }
Redraw (enable_back, enable_next);
}
} until ( ret == `next || ret == `back );
y2milestone ("Ret: %1, Some Add-on Added/Removed: %2", ret, some_addon_changed);
+ y2milestone ("Registration will be requested: %1", AddOnProduct::ProcessRegistration());
if (Mode::installation() && Stage::initial()) {
// bugzilla #221377
@@ -889,7 +899,7 @@
AddOnProduct::ReIntegrateFromScratch();
}
}
-
+
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/src/modules/AddOnProduct.ycp new/yast2-installation-2.15.2/src/modules/AddOnProduct.ycp
--- old/yast2-installation-2.15.1/src/modules/AddOnProduct.ycp 2006-12-07 08:24:53.000000000 +0100
+++ new/yast2-installation-2.15.2/src/modules/AddOnProduct.ycp 2006-12-11 16:10:14.000000000 +0100
@@ -723,37 +723,15 @@
return true;
}
-/**
- * Do installation of the add-on product within an installed system
- * srcid is got via AddOnProduct::src_id
- *
- * @param string src_id
- * @return symbol the result symbol from wizard sequencer
- */
-global symbol DoInstall() {
- // Display /media.1/info.txt if such file exists
- // Display license and wait for agreement
- // Not needed here, license already shown in the workflow
- /*
- boolean license_ret = AcceptedLicenseAndInfoFile(src_id);
- if (license_ret != true) {
- y2milestone("Removing the current source ID %1", src_id);
- Pkg::SourceDelete(src_id);
- return nil;
- }
- */
-
- string control = Pkg::SourceProvideOptionalFile (src_id, 1, "/installation.xml");
- // Fallback -- Source didn't provide needed controll file
- // Handling as it was an installation source
- if (control == nil)
- {
- y2milestone("File /installation.xml not found, running sw_single for this source");
- WFM::CallFunction ("sw_single", []);
+symbol DoInstall_NoControlFile () {
+ y2milestone("File /installation.xml not found, running sw_single for this source");
+ WFM::CallFunction ("sw_single", []);
- return nil;
- }
+ return `register;
+}
+symbol DoInstall_WithControlFile (string control) {
+ y2milestone ("File /installation.xml was found, running own workflow...");
// copy the control file to local filesystem - in case of media release
string tmp = (string)SCR::Read (.target.tmpdir);
tmp = tmp + "/installation.xml";
@@ -799,6 +777,7 @@
CleanY2Update();
return nil;
}
+
// start workflow
Wizard::OpenNextBackStepsDialog();
// dialog caption
@@ -809,6 +788,181 @@
symbol ret = ProductControl::Run();
UI::CloseDialog();
CleanY2Update();
+
+ return ret;
+}
+
+/**
+ * Contains list of source IDs that request registration
+ */
+list <integer> addons_requesting_registration = [];
+
+global void ClearRegistrationRequest (integer src_id) {
+ y2milestone ("Clearing registration flag for source ID %1", src_id);
+ if (src_id != nil) {
+ addons_requesting_registration = filter (integer one_source, addons_requesting_registration, {
+ return one_source != src_id;
+ });
+ }
+}
+
+/**
+ * Returns whether registration is requested by at least one of
+ * used Add-On products.
+ *
+ * @return boolean if requested
+ */
+global boolean ProcessRegistration () {
+ boolean force_registration = false;
+
+ // checking add-on products one by one
+ foreach (map prod, AddOnProduct::add_on_products, {
+ integer srcid = (integer) prod["media"]:nil;
+
+ if (srcid != nil && contains (addons_requesting_registration, srcid)) {
+ force_registration = true;
+ break;
+ }
+ });
+
+ y2milestone ("Requesting registration: %1", force_registration);
+ return force_registration;
+}
+
+/**
+ * Add-On product might have been added into products requesting
+ * registration. This pruduct has been removed (during configuring
+ * list of add-on products).
+ */
+global void RemoveRegistrationFlag (integer src_id) {
+ // filtering out src_id
+ addons_requesting_registration = filter (integer one_id, addons_requesting_registration, {
+ return one_id != src_id;
+ });
+
+ // removing cached file
+ string tmpdir = (string) SCR::Read (.target.tmpdir) + "/add-on-content-files/";
+ string cachedfile = sformat ("%1content-%2", tmpdir, src_id);
+ if (FileUtils::Exists (cachedfile)) {
+ y2milestone ("Removing cached file %1", cachedfile);
+ SCR::Execute (.target.remove, cachedfile);
+ }
+}
+
+/**
+ * Checks whether the content file of the add-on has a flag REGISTERPRODUCT
+ * set to "true" or "yes". If it has, product is added into list of pruducts
+ * that need registration. Cached content file is used if possible.
+ *
+ * @param integer source id
+ */
+global void PrepareForRegistration (integer src_id) {
+ string tmpdir = (string) SCR::Read (.target.tmpdir) + "/add-on-content-files/";
+
+ // create directory if doesn't exist
+ if (! FileUtils::Exists (tmpdir)) {
+ integer run = (integer) SCR::Execute (.target.bash, sformat("/bin/mkdir -p '%1'", tmpdir));
+ if (run != 0) {
+ y2error ("Cannot create directory %1", tmpdir);
+ return nil;
+ }
+ }
+
+ // use cached file if possible
+ string contentfile = sformat ("%1content-%2", tmpdir, src_id);
+ if (FileUtils::Exists (contentfile)) {
+ y2milestone ("Using cached contentfile %1", contentfile);
+ } else {
+ y2milestone ("Checking contentfile from source");
+ string sourcefile = Pkg::SourceProvideOptionalFile (src_id, 1, "/content");
+ if (sourcefile == nil) {
+ y2warning ("Cannot obtain content file!");
+ return nil;
+ }
+ // copying content file
+ integer run = (integer) SCR::Execute (.target.bash,
+ sformat ("/bin/cp '%1' '%2'", sourcefile, contentfile)
+ );
+ if (run != 0) {
+ y2error ("Cannot copy %1 to %2", sourcefile, contentfile);
+ return nil;
+ }
+ }
+
+ // registering agent for the current content file
+ SCR::RegisterAgent (.addon.content, `ag_ini (
+ `IniAgent( contentfile, $[
+ "options" : [ "read_only", "global_values", "flat" ],
+ "comments" : [ "^#.*", "^[ \t]*$", ],
+ "params" : [
+ $[ "match" : [ "^[ \t]*([a-zA-Z0-9_\.]+)[ \t]*(.*)[ \t]*$", "%s %s" ] ]
+ ]
+ ]
+ )));
+ string register_product = (string) SCR::Read (.addon.content.REGISTERPRODUCT);
+ SCR::UnregisterAgent (.addon.content);
+
+ // evaluating REGISTERPRODUCT flag, default (nil == false)
+ y2milestone ("RegisterProduct flag for source %1 is %2", src_id, register_product);
+ if (register_product == "yes" || register_product == "true") {
+ addons_requesting_registration = add (addons_requesting_registration, src_id);
+ }
+}
+
+/**
+ * Calls registration client if needed.
+ *
+ * @param integer source id
+ */
+global void RegisterAddOnProduct (integer src_id) {
+ if (contains (addons_requesting_registration, src_id)) {
+ y2milestone ("Source ID %1 requests registration", src_id);
+ WFM::CallFunction ("suse_register", []);
+ } else {
+ y2milestone ("Source ID %1 doesn't need registration", src_id);
+ }
+}
+
+/**
+ * Do installation of the add-on product within an installed system
+ * srcid is got via AddOnProduct::src_id
+ *
+ * @param string src_id
+ * @return symbol the result symbol from wizard sequencer
+ */
+global symbol DoInstall() {
+ // Display /media.1/info.txt if such file exists
+ // Display license and wait for agreement
+ // Not needed here, license already shown in the workflow
+ /*
+ boolean license_ret = AcceptedLicenseAndInfoFile(src_id);
+ if (license_ret != true) {
+ y2milestone("Removing the current source ID %1", src_id);
+ Pkg::SourceDelete(src_id);
+ return nil;
+ }
+ */
+
+ // FATE #301312
+ PrepareForRegistration (src_id);
+
+ symbol ret = nil;
+
+ string control = Pkg::SourceProvideOptionalFile (src_id, 1, "/installation.xml");
+ // Fallback -- Source didn't provide needed controll file
+ // Handling as it was an installation source
+ if (control == nil) {
+ ret = DoInstall_NoControlFile();
+ } else {
+ ret = DoInstall_WithControlFile (control);
+ }
+
+ if (ret != nil) {
+ // registers Add-On product if requested
+ RegisterAddOnProduct (src_id);
+ }
+
+ y2milestone ("Returning: %1", ret);
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/src/modules/ProductLicense.ycp new/yast2-installation-2.15.2/src/modules/ProductLicense.ycp
--- old/yast2-installation-2.15.1/src/modules/ProductLicense.ycp 2006-12-07 10:13:47.000000000 +0100
+++ new/yast2-installation-2.15.2/src/modules/ProductLicense.ycp 2006-12-11 16:10:17.000000000 +0100
@@ -165,6 +165,9 @@
list<string> files = (list<string>)SCR::Read (.target.dir, dir);
y2milestone ("All files in license directory: %1", files);
+ // no license
+ if (files == nil) return $[];
+
foreach (string p, patterns, {
if (! issubstring (p, "%"))
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.15.1/src/modules/X11Version.ycp new/yast2-installation-2.15.2/src/modules/X11Version.ycp
--- old/yast2-installation-2.15.1/src/modules/X11Version.ycp 2006-11-29 15:47:34.000000000 +0100
+++ new/yast2-installation-2.15.2/src/modules/X11Version.ycp 2006-12-08 12:57:58.000000000 +0100
@@ -16,7 +16,7 @@
:
STATUS : Development
*
- * $Id: X11Version.ycp 22825 2005-03-29 09:31:42Z jsrain $
+ * $Id: X11Version.ycp 34863 2006-12-08 11:57:55Z locilka $
*/
{
@@ -117,7 +117,7 @@
count = count + 1;
}
- if(file != nil && find(file, "XFree86") == -1) ret = "3";
+ if (file != nil && ! regexpmatch(file, "XFree86")) ret = "3";
y2milestone("X link: %1", ret);
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