[yast-commit] r40766 - in /trunk/add-on: VERSION package/yast2-add-on.changes src/Makefile.am src/add-on-workflow.ycp src/misc.ycp
Author: locilka
Date: Wed Sep 5 14:05:29 2007
New Revision: 40766
URL: http://svn.opensuse.org/viewcvs/yast?rev=40766&view=rev
Log:
- NotEnoughMemory-functions moved to a separate misc.ycp include
file to make them possible to be used from packager (#305554).
- 2.15.15
Added:
trunk/add-on/src/misc.ycp
Modified:
trunk/add-on/VERSION
trunk/add-on/package/yast2-add-on.changes
trunk/add-on/src/Makefile.am
trunk/add-on/src/add-on-workflow.ycp
Modified: trunk/add-on/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/VERSION?rev=40766&r1=40765&r2=40766&view=diff
==============================================================================
--- trunk/add-on/VERSION (original)
+++ trunk/add-on/VERSION Wed Sep 5 14:05:29 2007
@@ -1 +1 @@
-2.15.14
+2.15.15
Modified: trunk/add-on/package/yast2-add-on.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/package/yast2-add-on.changes?rev=40766&r1=40765&r2=40766&view=diff
==============================================================================
--- trunk/add-on/package/yast2-add-on.changes (original)
+++ trunk/add-on/package/yast2-add-on.changes Wed Sep 5 14:05:29 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Sep 5 14:02:25 CEST 2007 - locilka@suse.cz
+
+- NotEnoughMemory-functions moved to a separate misc.ycp include
+ file to make them possible to be used from packager (#305554).
+- 2.15.15
+
+-------------------------------------------------------------------
Wed Aug 29 10:21:17 CEST 2007 - locilka@suse.cz
- Using new Wizard window without installation steps displayed when
Modified: trunk/add-on/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/src/Makefile.am?rev=40766&r1=40765&r2=40766&view=diff
==============================================================================
--- trunk/add-on/src/Makefile.am (original)
+++ trunk/add-on/src/Makefile.am Wed Sep 5 14:05:29 2007
@@ -11,7 +11,8 @@
vendor.ycp
ynclude_DATA = \
- add-on-workflow.ycp
+ add-on-workflow.ycp \
+ misc.ycp
desktop_DATA = \
add-on.desktop \
Modified: trunk/add-on/src/add-on-workflow.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/src/add-on-workflow.ycp?rev=40766&r1=40765&r2=40766&view=diff
==============================================================================
--- trunk/add-on/src/add-on-workflow.ycp (original)
+++ trunk/add-on/src/add-on-workflow.ycp Wed Sep 5 14:05:29 2007
@@ -31,8 +31,10 @@
import "Wizard";
import "Confirm";
import "GetInstArgs";
+import "Installation";
include "packager/inst_source_dialogs.ycp";
+include "add-on/misc.ycp";
boolean going_back_in_workflow = GetInstArgs::going_back();
@@ -998,69 +1000,6 @@
}
}
-/**
- * Returns whether the machine has insufficient memory for using
- * Add-Ons (in inst-sys).
- *
- * @return boolean has insufficient memory
- */
-boolean HasInsufficientMemory () {
- // 384 MB - 5% (bugzilla #239630)
- integer enough_memory = 373000;
-
- map meminfo = (map) SCR::Read (.proc.meminfo);
- integer totalmem = meminfo["memtotal"]:0 + meminfo["swaptotal"]:0;
-
- y2milestone ("Memory: %1, Swap: %2, Total: %3",
- meminfo["memtotal"]:0, meminfo["swaptotal"]:0, totalmem
- );
-
- // something is wrong
- if (totalmem == nil) {
- // using only RAM if possible
- if (meminfo["memtotal"]:nil != nil) {
- totalmem = meminfo["memtotal"]:0;
- // can't do anything, just assume we enough
- } else {
- totalmem = enough_memory;
- }
- }
-
- // do we have less memory than needed?
- return (totalmem < enough_memory);
-}
-
-boolean ContinueIfInsufficientMemory () {
- y2warning ("Not enough memory!");
-
- // If already reported, just continue
- if (! AddOnProduct::low_memory_already_reported) {
- // report it only once
- AddOnProduct::low_memory_already_reported = true;
-
- if (Popup::YesNoHeadline (
- // TRANSLATORS: pop-up headline
- _("Warning: Not enough memory!"),
- // TRANSLATORS: pop-up question
- _("Your system does not seem to have enough memory to use add-on products
-during installation. You can enable add-on products later when the
-system is running.
-
-Do you want to skip using add-on products?")
- )) {
- y2milestone ("User decided to skip Add-Ons");
-
- return false;
- } else {
- y2warning ("User decided to continue with not enough memory...!");
-
- return true;
- }
- }
-
- return true;
-}
-
// bugzilla #221377
// the original control file is stored as /control.xml
// the other (added) control files are under the
@@ -1082,7 +1021,13 @@
// on machine with less memory
// Do not report when some add-ons are already in use
if (not_enough_memory && ! no_addons) {
- if (! ContinueIfInsufficientMemory ()) return `next;
+ if (! ContinueIfInsufficientMemory ()) {
+ // next time, it will be skipped too
+ Installation::add_on_selected = false;
+ Installation::productsources_selected = false;
+
+ return `next;
+ }
}
// FATE #301928 - Saving one click
Added: trunk/add-on/src/misc.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/src/misc.ycp?rev=40766&view=auto
==============================================================================
--- trunk/add-on/src/misc.ycp (added)
+++ trunk/add-on/src/misc.ycp Wed Sep 5 14:05:29 2007
@@ -0,0 +1,86 @@
+/**
+ * File:
+ * include/add-on/misc.ycp
+ *
+ * Module:
+ * System installation
+ *
+ * Summary:
+ * Add-on product miscellaneous
+ *
+ * Authors:
+ * Lukas Ocilka
participants (1)
-
locilka@svn.opensuse.org