Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47325 - in /trunk/installation: package/yast2-installation.changes src/clients/inst_upgrade_urls.ycp
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Tue, 06 May 2008 15:40:26 -0000
  • Message-id: <20080506154026.516B2299C8@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Tue May 6 17:40:25 2008
New Revision: 47325

URL: http://svn.opensuse.org/viewcvs/yast?rev=47325&view=rev
Log:
- When reusing the old repositories during upgrade, copying also
'autorefresh' and 'alias' (bnc #387261).


Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_upgrade_urls.ycp

Modified: trunk/installation/package/yast2-installation.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=47325&r1=47324&r2=47325&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Tue May 6 17:40:25
2008
@@ -1,8 +1,14 @@
-------------------------------------------------------------------
+Tue May 6 17:37:22 CEST 2008 - locilka@xxxxxxx
+
+- When reusing the old repositories during upgrade, copying also
+ 'autorefresh' and 'alias' (bnc #387261).
+
+-------------------------------------------------------------------
Fri May 2 22:27:21 CEST 2008 - mzugec@xxxxxxx

-- don't stop network (by kill dhcpcd) at the end of 1.st stage
-(bnc#386588)
+- Don't stop network (by killing dhcpcd) at the end of 1.st stage
+ (bnc #386588)

-------------------------------------------------------------------
Mon May 5 13:26:27 CEST 2008 - locilka@xxxxxxx

Modified: trunk/installation/src/clients/inst_upgrade_urls.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_upgrade_urls.ycp?rev=47325&r1=47324&r2=47325&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_upgrade_urls.ycp (original)
+++ trunk/installation/src/clients/inst_upgrade_urls.ycp Tue May 6 17:40:25
2008
@@ -72,7 +72,7 @@

counter = counter + 1;

- // bugzilla #300901
+ // bnc #300901
boolean enabled = nil;

if (is (xmlcontent["source","enabled","value"]:nil, boolean)) {
@@ -298,7 +298,7 @@
if (new_urls != nil && new_urls != []) {
foreach (map one_url_map, new_urls, {

- // bugzilla #300901
+ // bnc #300901
boolean enabled = nil;

// mapping url (zypp-based) keys to keys used in pkg-bindings
@@ -310,7 +310,21 @@
enabled = one_url_map["enabled"]:false;
}

+ // bnc #387261
+ boolean autorefresh = true;
+
+ // mapping url (zypp-based) keys to keys used in pkg-bindings
+ if (is (one_url_map["autorefresh"]:0, integer)) {
+ autorefresh = (one_url_map["autorefresh"]:0 == 1);
+ } else if (is (one_url_map["autorefresh"]:"0", string)) {
+ autorefresh = (one_url_map["autorefresh"]:"0" == "1");
+ } else if (is (one_url_map["autorefresh"]:false, boolean)) {
+ autorefresh = one_url_map["autorefresh"]:false;
+ }
+
map <string, any> new_url_map = $[
+ "autorefresh" : autorefresh,
+ "alias" : one_url_map["id"]:one_url_map["baseurl"]:"",
"url" : one_url_map["baseurl"]:nil,
"name" : (one_url_map["name"]:"" == "" ?
one_url_map["id"]:"" : one_url_map["name"]:""),
"enabled" : enabled,
@@ -468,7 +482,7 @@
Wizard::SetTitleIcon ("yast-sw_source");
}

- // See bugzilla #309317
+ // See bnc #309317
string GetUniqueAlias (string alias_orig) {
if (alias_orig == nil) alias_orig = "";

@@ -496,11 +510,45 @@
return alias;
}

+ string GetOriginalAlias (string url) {
+ if (url == nil || url == "") {
+ y2error ("Undefined URL: %1", url);
+ return url;
+ }
+
+ foreach (map one_url, urls, {
+ if (one_url["url"]:"" == url) {
+ url = one_url["alias"]:url;
+ break;
+ }
+ });
+
+ return url;
+ }
+
+ boolean GetOriginalAutorefresh (string url) {
+ boolean ret = true;
+
+ if (url == nil || url == "") {
+ y2error ("Undefined URL: %1", url);
+ return ret;
+ }
+
+ foreach (map one_url, urls, {
+ if (one_url["url"]:"" == url) {
+ ret = one_url["autorefresh"]:true;
+ break;
+ }
+ });
+
+ return ret;
+ }
+
symbol AddOrRemoveSources () {
list <integer> sources_to_remove = [];
list <string> sources_to_add = [];

- // bugzilla #308763
+ // bnc #308763
list <string> sources_to_add_disabled = [];

foreach (map one_source, urls, {
@@ -561,7 +609,7 @@
if (repo_name == nil) repo_name = "";
string pth = "/";

- // see bugzilla #310209
+ // see bnc #310209
// Adding repositories with their correct names
map <string, any> repoadd = $[
"enabled" : false,
@@ -569,8 +617,13 @@
"base_urls" : [one_url],
"prod_dir" : pth,
// alias needs to be unique
- // bugzilla #309317
- "alias" : GetUniqueAlias (one_url),
+ // bnc #309317
+ //
+ // alias is taken from the system first
+ // bnc #387261
+ //
+ "alias" : GetUniqueAlias (GetOriginalAlias (one_url)),
+ "autorefresh" : GetOriginalAutorefresh (one_url),
"type" : repo_type,
];
y2milestone ("Adding repo (enabled): %1", repoadd);
@@ -627,7 +680,7 @@
}

// Adding the rest of sources in a disabled state
- // bugzilla #326342
+ // bnc #326342
if (size (sources_to_add_disabled) > 0) {
y2milestone ("Adding DISABLED repos: %1", sources_to_add_disabled);

@@ -637,7 +690,7 @@
if (repo_name == nil) repo_name = "";
string pth = "/";

- // see bugzilla #310209
+ // see bnc #310209
// Adding repositories with their correct names
map <string, any> repoadd = $[
"enabled" : false,
@@ -645,8 +698,13 @@
"base_urls" : [one_url],
"prod_dir" : pth,
// alias needs to be unique
- // bugzilla #309317
- "alias" : GetUniqueAlias (one_url),
+ // bnc #309317
+ //
+ // alias is taken from the system first
+ // bnc #387261
+ //
+ "alias" : GetUniqueAlias (GetOriginalAlias (one_url)),
+ "autorefresh" : GetOriginalAutorefresh (one_url),
];

// do not probe! adding as disabled!

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages