Author: locilka
Date: Wed Sep 5 14:59:51 2007
New Revision: 40771
URL: http://svn.opensuse.org/viewcvs/yast?rev=40771&view=rev
Log:
- Reading and using proxy settings before inst_productsources
starts downloading files (#307680).
- Initializing packager callbacks in inst_productsources on
a running system (#307652).
- Warning when inst_productsources is called in installation and
the inst-sys has not enough memory (#305554).
- Adjusted RPM dependencies.
- 2.15.75
Added:
trunk/packager/src/clients/inst_check_memsize.ycp
Modified:
trunk/packager/VERSION
trunk/packager/package/yast2-packager.changes
trunk/packager/src/clients/inst_productsources.ycp
trunk/packager/src/modules/AddOnProduct.ycp
trunk/packager/yast2-packager.spec.in
Modified: trunk/packager/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=40771&r1=40770&r2=40771&view=diff
==============================================================================
--- trunk/packager/VERSION (original)
+++ trunk/packager/VERSION Wed Sep 5 14:59:51 2007
@@ -1 +1 @@
-2.15.74
+2.15.75
Modified: trunk/packager/package/yast2-packager.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=40771&r1=40770&r2=40771&view=diff
==============================================================================
--- trunk/packager/package/yast2-packager.changes (original)
+++ trunk/packager/package/yast2-packager.changes Wed Sep 5 14:59:51 2007
@@ -1,4 +1,16 @@
-------------------------------------------------------------------
+Wed Sep 5 13:41:41 CEST 2007 - locilka@suse.cz
+
+- Reading and using proxy settings before inst_productsources
+ starts downloading files (#307680).
+- Initializing packager callbacks in inst_productsources on
+ a running system (#307652).
+- Warning when inst_productsources is called in installation and
+ the inst-sys has not enough memory (#305554).
+- Adjusted RPM dependencies.
+- 2.15.75
+
+-------------------------------------------------------------------
Mon Sep 3 16:41:26 CEST 2007 - locilka@suse.cz
- Correctly evaluating relurl:// parameters, such as
Added: trunk/packager/src/clients/inst_check_memsize.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/inst_check_memsize.ycp?rev=40771&view=auto
==============================================================================
--- trunk/packager/src/clients/inst_check_memsize.ycp (added)
+++ trunk/packager/src/clients/inst_check_memsize.ycp Wed Sep 5 14:59:51 2007
@@ -0,0 +1,27 @@
+/**
+ * File: clients/inst_check_memsize.ycp
+ * Package: Installation
+ * Summary: Checking whether system has enough memory (bugzilla #305554)
+ * Authors: Lukas Ocilka
+ *
+ * $Id:$
+ *
+ */
+
+{
+ include "add-on/misc.ycp";
+
+ // Memory is low
+ if (HasInsufficientMemory()) {
+ // User wants to continue
+ if (ContinueIfInsufficientMemory ()) {
+ return `continue;
+ // User wants to skip
+ } else {
+ return `skip;
+ }
+ }
+
+ // Enough memory
+ return `continue;
+}
Modified: trunk/packager/src/clients/inst_productsources.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/inst_productsources.ycp?rev=40771&r1=40770&r2=40771&view=diff
==============================================================================
--- trunk/packager/src/clients/inst_productsources.ycp (original)
+++ trunk/packager/src/clients/inst_productsources.ycp Wed Sep 5 14:59:51 2007
@@ -68,6 +68,7 @@
import "Stage";
import "Report";
import "CommandLine";
+ import "PackageCallbacks";
import "FileUtils";
import "HTTP";
@@ -82,6 +83,11 @@
include "installation/misc.ycp";
+ if (AddOnProduct::skip_add_ons) {
+ y2milestone ("Skipping module (as requested before)");
+ return `auto;
+ }
+
if (GetInstArgs::going_back()) {
y2milestone ("Going back...");
return `back;
@@ -118,6 +124,43 @@
return sformat ("(%1|%2)", s_url, s_path);
}
+
+
+ // See bugzilla #307680
+ // Proxy needs to be read from sysconfig and
+ // set by setenv() builtin
+ void InitProxySettings () {
+ y2milestone ("Adjusting proxy settings");
+
+ map proxy_items = $[
+ "http_proxy":"HTTP_PROXY", "FTP_PROXY":"FTP_PROXY",
+ "HTTPS_PROXY":"HTTPS_PROXY", "NO_PROXY":"NO_PROXY",
+ ];
+ boolean use_proxy = false;
+
+ SCR::RegisterAgent (
+ .current_proxy_settings,
+ `ag_ini(
+ `SysConfigFile("/etc/sysconfig/proxy")
+ )
+ );
+
+ use_proxy = (SCR::Read(.sysconfig.proxy.PROXY_ENABLED) != "no");
+
+ string item_value = "";
+ foreach (string proxy_item, string sysconfig_item, proxy_items, {
+ item_value = (string) SCR::Read (add (.sysconfig.proxy, sysconfig_item));
+ if (item_value == nil) item_value = "";
+
+ if (use_proxy == true && item_value != "") {
+ y2milestone ("Adjusting '%1'='%2'", proxy_item, item_value);
+ setenv (proxy_item, item_value);
+ }
+ });
+
+ SCR::UnregisterAgent (.current_proxy_settings);
+ }
+
// Function returns whether user wants to abort the installation / configuration
// true - abort
// false - do not abort
@@ -312,6 +355,10 @@
y2milestone ("Server response: %1", server_response);
+ if (server_response == nil) {
+ return false;
+ }
+
return true;
}
@@ -424,7 +471,7 @@
map cmd = (map) SCR::Execute (.target.bash_output, "echo -n $LANG");
string ret = tostring (cmd["stdout"]:"");
- if (ret == "C" || ret == "") ret = nil;
+ if (ret == "C" || ret == "" || ret == "POSIX") ret = nil;
y2milestone ("Using lang: %1", ret);
return ret;
@@ -471,6 +518,23 @@
if (UserWantsToAbort()) return `abort;
+ // Bugzilla #305554
+ // Check if there is enough memory (only in inst-sys)
+ // Called via WFM::call because of breaking RPM dependencies
+ // on yast2-add-on package.
+ if (Stage::initial()) {
+ any client_ret = WFM::call ("inst_check_memsize");
+
+ if (client_ret == `skip) {
+ // do not use them next time
+ Installation::add_on_selected = false;
+ Installation::productsources_selected = false;
+ y2milestone ("Skipping inst_productsources");
+
+ return `skip;
+ }
+ }
+
if (! NetworkRunning()) {
y2warning ("Cannot proceed, no network configured...");
// TRANSLATORS: error report
@@ -502,6 +566,15 @@
}
Progress::NextStage();
+
+ if (UserWantsToAbort()) return `abort;
+
+ // hotfix for bug #307680
+ // yast2-transfer ignores proxy settings
+ // will be fixed globally after 10.3
+ if (Mode::normal()) {
+ InitProxySettings();
+ }
if (UserWantsToAbort()) return `abort;
@@ -513,7 +586,14 @@
if (language_long == nil)
language_long = Language::language;
- language_short = substring (language_long, 0, 2);
+ if (language_long != nil) {
+ if (size(language_long) >= 2) {
+ language_short = substring (language_long, 0, 2);
+ } else {
+ language_short = language_long;
+ }
+ }
+
y2milestone ("Preferred language: %1 %2", language_long, language_short);
if (UserWantsToAbort()) return `abort;
@@ -1218,6 +1298,8 @@
"ws_start" : "read",
"read" : $[
`next : "sources",
+ // not enough memory
+ `skip : `next,
`nosources : `next,
`abort : `abort,
],
Modified: trunk/packager/src/modules/AddOnProduct.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/AddOnProduct.ycp?rev=40771&r1=40770&r2=40771&view=diff
==============================================================================
--- trunk/packager/src/modules/AddOnProduct.ycp (original)
+++ trunk/packager/src/modules/AddOnProduct.ycp Wed Sep 5 14:59:51 2007
@@ -89,6 +89,11 @@
// In installation: check for low-memory machines
global boolean low_memory_already_reported = false;
+// Bugzilla #305554
+// Both online-repositories and add-ons use the same function and variable
+// if true, both are skipped at once without asking
+global boolean skip_add_ons = false;
+
// --> FATE #302123: Allow relative paths in "add_on_products" file
string base_product_url = nil;
Modified: trunk/packager/yast2-packager.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/yast2-packager.spec.in?rev=40771&r1=40770&r2=40771&view=diff
==============================================================================
--- trunk/packager/yast2-packager.spec.in (original)
+++ trunk/packager/yast2-packager.spec.in Wed Sep 5 14:59:51 2007
@@ -26,6 +26,12 @@
# XML module (inst_productsources.ycp)
Requires: yast2-xml
+# setenv() builtin
+Conflicts: yast2-core < 2.15.10
+
+# NotEnoughMemory-related functions moved to misc.ycp import-file
+Conflicts: yast2-add-on < 2.15.15
+
Provides: yast2-config-package-manager
Obsoletes: yast2-config-package-manager
Provides: y2t_spkg y2t_inst-packages y2pkginf y2c_spkg
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org