Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54953 - in /branches/SuSE-Code-11-Branch/add-on: VERSION package/yast2-add-on.changes src/add-on-workflow.ycp
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Fri, 23 Jan 2009 15:44:49 -0000
  • Message-id: <E1LQODB-0004iY-NP@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Fri Jan 23 16:44:49 2009
New Revision: 54953

URL: http://svn.opensuse.org/viewcvs/yast?rev=54953&view=rev
Log:
- Fixed displaying repository information for add-on products
(bnc #459461)
- Storing sources before calling registration on a running system
(bnc #468449)
- 2.17.15


Modified:
branches/SuSE-Code-11-Branch/add-on/VERSION
branches/SuSE-Code-11-Branch/add-on/package/yast2-add-on.changes
branches/SuSE-Code-11-Branch/add-on/src/add-on-workflow.ycp

Modified: branches/SuSE-Code-11-Branch/add-on/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on/VERSION?rev=54953&r1=54952&r2=54953&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on/VERSION (original)
+++ branches/SuSE-Code-11-Branch/add-on/VERSION Fri Jan 23 16:44:49 2009
@@ -1 +1 @@
-2.17.14
+2.17.15

Modified: branches/SuSE-Code-11-Branch/add-on/package/yast2-add-on.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on/package/yast2-add-on.changes?rev=54953&r1=54952&r2=54953&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on/package/yast2-add-on.changes (original)
+++ branches/SuSE-Code-11-Branch/add-on/package/yast2-add-on.changes Fri Jan 23
16:44:49 2009
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Fri Jan 23 16:40:01 CET 2009 - locilka@xxxxxxx
+
+- Fixed displaying repository information for add-on products
+ (bnc #459461)
+- Storing sources before calling registration on a running system
+ (bnc #468449)
+- 2.17.15
+
+-------------------------------------------------------------------
Mon Jan 12 15:12:49 CET 2009 - locilka@xxxxxxx

- Fixed displaying URL and product directory while editing an

Modified: branches/SuSE-Code-11-Branch/add-on/src/add-on-workflow.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on/src/add-on-workflow.ycp?rev=54953&r1=54952&r2=54953&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on/src/add-on-workflow.ycp (original)
+++ branches/SuSE-Code-11-Branch/add-on/src/add-on-workflow.ycp Fri Jan 23
16:44:49 2009
@@ -208,6 +208,14 @@
Pkg::SourceRefreshNow (AddOnProduct::src_id);
Pkg::SourceLoad();

+ // BNC #468449
+ // It may happen that the add-on control file contains some code that
+ // would drop the changes made, so it's better to save the soruces now
+ if (Mode::normal()) {
+ y2milestone ("Saving all sources");
+ Pkg::SourceSaveAll();
+ }
+
AddOnProduct::last_ret = ret;
y2milestone ("MediaSelect Dialog ret: %1", ret);
return ret;
@@ -1189,10 +1197,20 @@
UI::ChangeWidget (`id ("product_details"), `Value, rt_description);
}

+/**
+ * Logs wrong product with 'log_this' error and returns 'return_this'.
+ * Added because of bnc #459461
+ */
+string LogWrongProduct (map <string,any> one_product, string log_this, string
return_this) {
+ y2error ("Erroneous product: %1: %2", log_this, one_product);
+
+ return return_this;
+}
+
void RedrawAddOnsOverviewTable () {
list <map <string,any> > all_products = Pkg::ResolvableProperties ("",
`product, "");

- integer medium_nr = nil;
+ integer source_nr = nil;
map repository_info = nil;
integer counter = -1;

@@ -1200,21 +1218,29 @@
product_infos = $[];

foreach (map <string,any> one_product, all_products, {
- if (one_product["type"]:"addon" != "addon") {
+ // only add-on products should be listed
+ if (haskey (one_product, "type") && one_product["type"]:"addon" !=
"addon") {
y2milestone ("Skipping product: %1",
one_product["display_name"]:one_product["name"]:"");
- continue;
+ return;
}

- medium_nr = one_product["medium_nr"]:-1;
- if (medium_nr != nil && medium_nr != -1) {
+ // BNC #459461
+ // It's currently "source" key which defines the repository ID
+ source_nr = one_product["source"]:-1;
+
+ if (source_nr == nil || source_nr == -1) {
+ y2warning ("Skipping product with no 'source' ID: %1", one_product);
+ } else {
counter = counter + 1;

- repository_info = Pkg::SourceGeneralData (one_product["source"]:-1);
+ repository_info = Pkg::SourceGeneralData (source_nr);
if (repository_info == nil) {
repository_info = $[];
}

- //y2milestone ("Product: %1, Info: %2", one_product,
repository_info);
+ // otherwise it fills the log too much
+ one_product["license"] = "";
+ y2milestone ("Product: %1, Info: %2", one_product, repository_info);

product_infos[tostring(counter)] = $[
"product" : one_product,
@@ -1228,7 +1254,9 @@
products = add (products, `item (
`id (sformat ("product_%1", counter)),
one_product["display_name"]:one_product["name"]:_("Unknown
product"),
-
repository_info["url"]:repository_info["base_urls",0]:_("Unknown URL")
+
repository_info["url"]:repository_info["base_urls",0]:LogWrongProduct (
+ one_product, "Unknown URL", _("Unknown URL")
+ )
));
}
});

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

< Previous Next >
This Thread
  • No further messages