Mailinglist Archive: yast-commit (1212 mails)

< Previous Next >
[yast-commit] r50905 - in /trunk/packager: agents/Makefile.am agents/ag_xmlrepos agents/xmlrepos.scr package/yast2-packager.changes src/modules/OneClickInstallStandard.ycp yast2-packager.spec.in
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Tue, 09 Sep 2008 13:34:32 -0000
  • Message-id: <20080909133432.B25ED398DD@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Tue Sep 9 15:34:32 2008
New Revision: 50905

URL: http://svn.opensuse.org/viewcvs/yast?rev=50905&view=rev
Log:
- xmlrepos SCR agent replaced with OneClickInstallStandard module
using XML::Simple (anyxml SCR agent) instead of perl-XML-Bare
(bnc #424263).


Removed:
trunk/packager/agents/ag_xmlrepos
trunk/packager/agents/xmlrepos.scr
Modified:
trunk/packager/agents/Makefile.am
trunk/packager/package/yast2-packager.changes
trunk/packager/src/modules/OneClickInstallStandard.ycp
trunk/packager/yast2-packager.spec.in

Modified: trunk/packager/agents/Makefile.am
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/packager/agents/Makefile.am?rev=50905&r1=50904&r2=50905&view=diff
==============================================================================
--- trunk/packager/agents/Makefile.am (original)
+++ trunk/packager/agents/Makefile.am Tue Sep 9 15:34:32 2008
@@ -3,11 +3,9 @@
#

agent_SCRIPTS = \
- ag_xmlrepos \
ag_zypp_repos

scrconf_DATA = \
- xmlrepos.scr \
zypp_repos.scr

EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)

Modified: trunk/packager/package/yast2-packager.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=50905&r1=50904&r2=50905&view=diff
==============================================================================
--- trunk/packager/package/yast2-packager.changes (original)
+++ trunk/packager/package/yast2-packager.changes Tue Sep 9 15:34:32 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Sep 9 15:32:11 CEST 2008 - locilka@xxxxxxx
+
+- xmlrepos SCR agent replaced with OneClickInstallStandard module
+ using XML::Simple (anyxml SCR agent) instead of perl-XML-Bare
+ (bnc #424263).
+
+-------------------------------------------------------------------
Tue Sep 9 11:13:26 CEST 2008 - locilka@xxxxxxx

- Packages 'Slides' and 'SlideShow' moved to yast2.

Modified: trunk/packager/src/modules/OneClickInstallStandard.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/OneClickInstallStandard.ycp?rev=50905&r1=50904&r2=50905&view=diff
==============================================================================
--- trunk/packager/src/modules/OneClickInstallStandard.ycp (original)
+++ trunk/packager/src/modules/OneClickInstallStandard.ycp Tue Sep 9 15:34:32
2008
@@ -37,28 +37,70 @@
* "en_GB" : "repository name (localized to en_GB)",
* ...
* ],
- * "mirrors" : [
- * $[
- * "url" : "full url of the mirror (http://.../)",
- * "location" : "?",
- * "score" : number,
- * ]
- * ...
- * ]
* ]
*/
global list <map <string, any> > GetRepositoriesFromXML (string filename) {
+ list <map <string, any> > ret = [];
+
if (! FileUtils::Exists (filename)) {
- y2error ("No such file: '%1'", filename);
- return nil;
+ y2error ("File doesn't exist: %1", filename);
+ return ret;
}

- list <map <string, any> > ret = (list <map <string, any> >) SCR::Read
(.xmlrepos, filename);
+ map read_result = (map) SCR::Read (.anyxml, filename);

- if (ret == nil) {
- y2error ("Wrong XML file: %1", filename);
+ if (read_result == nil) {
+ y2error ("Cannot read file: %1", filename);
+ return ret;
+ } else if (read_result == $[]) {
+ y2warning ("File %1 is empty", filename);
+ return ret;
}

+ string distversion = "";
+
+ map <string, any> one_repo_out = $[];
+
+ // starting with <metapackage>-><group>
+ foreach (map one_group, read_result["metapackage",0,"group"]:[], {
+ distversion = one_group["distversion"]:"";
+
+ foreach (map repository,
one_group["repositories",0,"repository"]:[], {
+ // One repository (requierd keys)
+ one_repo_out = $[
+ "distversion" : distversion,
+ "url" : repository["url",0,"content"]:"",
+ "format" : repository["format"]:"",
+ "recommended" : (repository["recommended"]:"false" ==
"true"),
+ ];
+
+ // Required + dynamic (localized) keys
+ foreach (string one_key, ["name", "description", "summary"], {
+ string loc_key = "localized_" + one_key;
+ one_repo_out[loc_key] = $[];
+
+ foreach (map one_item, repository[one_key]:[], {
+ if (one_item["content"]:"" != "") {
+ if (haskey (one_item, "xml:lang")) {
+ one_repo_out[loc_key, one_item["xml:lang"]:""]
= one_item["content"]:"";
+ } else {
+ one_repo_out[one_key] = one_item["content"]:"";
+ }
+ }
+ });
+ });
+
+ // Fallback
+ foreach (string one_key, ["name", "description", "summary"], {
+ if (is (repository[one_key]:nil, map) &&
repository[one_key, "content"]:"" != "") {
+ one_repo_out[one_key] = repository[one_key,
"content"]:"";
+ }
+ });
+
+ ret = add (ret, one_repo_out);
+ });
+ });
+
return ret;
}
}

Modified: trunk/packager/yast2-packager.spec.in
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/packager/yast2-packager.spec.in?rev=50905&r1=50904&r2=50905&view=diff
==============================================================================
--- trunk/packager/yast2-packager.spec.in (original)
+++ trunk/packager/yast2-packager.spec.in Tue Sep 9 15:34:32 2008
@@ -13,10 +13,6 @@
# "order" flag for pattern resolvables
BuildRequires: yast2-pkg-bindings >= 2.16.31

-
-# Module: OneClickInstallStandard
-Requires: perl-XML-Bare yast2-perl-bindings
-
# Newly added RPM
Requires: yast2-country-data >= 2.16.3


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

< Previous Next >
This Thread
  • No further messages