[yast-commit] r62734 - in /trunk/dirinstall: VERSION package/yast2-dirinstall.changes src/clients/dirinstall_options.ycp
Author: lslezak Date: Wed Nov 3 14:56:36 2010 New Revision: 62734 URL: http://svn.opensuse.org/viewcvs/yast?rev=62734&view=rev Log: - fixed package import from AutoYaST XML profile (bnc#568517) - 2.20.0 Modified: trunk/dirinstall/VERSION trunk/dirinstall/package/yast2-dirinstall.changes trunk/dirinstall/src/clients/dirinstall_options.ycp Modified: trunk/dirinstall/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/VERSION?rev=62734&r1=62733&r2=62734&view=diff ============================================================================== --- trunk/dirinstall/VERSION (original) +++ trunk/dirinstall/VERSION Wed Nov 3 14:56:36 2010 @@ -1 +1 @@ -2.19.0 +2.20.0 Modified: trunk/dirinstall/package/yast2-dirinstall.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/package/yast2-dirinstall.changes?rev=62734&r1=62733&r2=62734&view=diff ============================================================================== --- trunk/dirinstall/package/yast2-dirinstall.changes (original) +++ trunk/dirinstall/package/yast2-dirinstall.changes Wed Nov 3 14:56:36 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Nov 3 13:54:23 UTC 2010 - lslezak@suse.cz + +- fixed package import from AutoYaST XML profile (bnc#568517) +- 2.20.0 + +------------------------------------------------------------------- Wed Jul 7 13:15:51 UTC 2010 - lslezak@suse.cz - fixed Keyboard::Save() call (bnc#574707) Modified: trunk/dirinstall/src/clients/dirinstall_options.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/src/clients/dirinstall_options.ycp?rev=62734&r1=62733&r2=62734&view=diff ============================================================================== --- trunk/dirinstall/src/clients/dirinstall_options.ycp (original) +++ trunk/dirinstall/src/clients/dirinstall_options.ycp Wed Nov 3 14:56:36 2010 @@ -135,13 +135,75 @@ && (DirInstall::autoyast_software != w_autoyast || ! DirInstall::use_autoyast_software)) { - if (! ( Profile::ReadXML( w_autoyast ) - || AutoinstSoftware::Import(Profile::current["software"]:$[]))) + if ( Profile::ReadXML( w_autoyast )) + { + // reset the current selection, start from scratch + Pkg::PkgReset(); + + map settings = Profile::current["software"]:$[]; + y2milestone("Read software data: %1", settings); + + list<string> patterns = settings["patterns"]:[]; + y2milestone("Installing patterns: %1", patterns); + foreach (string pat, patterns, { + Pkg::ResolvableInstall(pat, `pattern); + }); + + list<string> post_patterns = settings["post-patterns"]:[]; + y2milestone("Installing post-patterns: %1", patterns); + foreach (string pat, post_patterns, { + Pkg::ResolvableInstall(pat, `pattern); + }); + + list<string> packages = settings["packages"]:[]; + + string notFound = ""; + foreach(string pack, packages, { + if(!Pkg::IsAvailable(pack)) { + notFound = notFound + pack + "\n"; + } + }); + + if(size(notFound) > 0) { + y2error("packages not found: %1",notFound); + // warning text when selecting packages. %1 is a list of package names + Report::LongError( sformat(_("These packages could not be found in the software repositories:\n%1"), notFound)); + } + + string kernel = settings["kernel"]:""; + + if (kernel != nil && kernel != "") + { + y2milestone("Adding kernel package: %1", kernel); + packages = add(packages, kernel); + } + + list<string> post_packages = settings["post-packages"]:[]; + if (size(post_packages) > 0) + { + y2milestone("Merging post-packages: %1", post_packages); + packages = (list<string>)merge(packages, post_packages); + } + + y2milestone("Selecting packages: %1", packages); + Pkg::DoProvide(packages); + + list<string> taboo_packages = settings["remove-packages"]:[]; + if (size(taboo_packages) > 0) + { + y2milestone("Taboo packages: %1", taboo_packages); + foreach (string tp, taboo_packages, { + Pkg::PkgTaboo(tp); + }); + } + + y2internal("products after import: %1", Pkg::ResolvableProperties ("", `product, "")); + } + else { Report::Error (_("Failed to read the AutoYaST profile.")); continue; } - AutoinstSoftware::Write(); } DirInstall::use_autoyast_software = (boolean)UI::QueryWidget (`id (`use_autoyast), `Value); DirInstall::autoyast_software = w_autoyast; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn2.opensuse.org