[yast-commit] r52384 - in /trunk/storage: package/yast2-storage.changes storage/src/inst_disk_proposal.ycp storage/src/modules/Storage.ycp storage/src/proposal/partitions_proposal.ycp
Author: kmachalkova Date: Tue Oct 21 10:50:40 2008 New Revision: 52384 URL: http://svn.opensuse.org/viewcvs/yast?rev=52384&view=rev Log: Better fix for #433001, avoiding code duplication HandlePackages moved from _proposal clients to Storage Modified: trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/inst_disk_proposal.ycp trunk/storage/storage/src/modules/Storage.ycp trunk/storage/storage/src/proposal/partitions_proposal.ycp Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=52384&r1=52383&r2=52384&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Tue Oct 21 10:50:40 2008 @@ -1,9 +1,13 @@ ------------------------------------------------------------------- -Mon Oct 20 12:36:48 CEST 2008 - aschnell@suse.de +Tue Oct 21 10:44:56 CEST 2008 - kmachalkova@suse.cz -- avoid clearing file system label (bnc #436360) - Use PackagesProposal module to request packages needed by storage during installation (bnc#433001) + +------------------------------------------------------------------- +Mon Oct 20 12:36:48 CEST 2008 - aschnell@suse.de + +- avoid clearing file system label (bnc #436360) - 2.17.41 ------------------------------------------------------------------- Modified: trunk/storage/storage/src/inst_disk_proposal.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/inst_disk_proposal.ycp?rev=52384&r1=52383&r2=52384&view=diff ============================================================================== --- trunk/storage/storage/src/inst_disk_proposal.ycp (original) +++ trunk/storage/storage/src/inst_disk_proposal.ycp Tue Oct 21 10:50:40 2008 @@ -33,20 +33,6 @@ include "partitioning/custom_part_check_generated.ycp"; include "partitioning/do_proposal_flexible.ycp"; -define void HandlePackages() - ``{ - Pkg::DoRemove( ["lvm2"] ); - list<string> pack = Storage::AddPackageList(); - if( size(pack)>0 ) - { - Pkg::DoProvide( pack ); - } - if( Stage::initial() ) - { - Storage::SaveUsedFs(); - } - } - define boolean AskOverwriteChanges() ``{ boolean ret = true; @@ -110,7 +96,7 @@ Wizard::OpenNextBackDialog(); symbol result = WizardSequencer(aliases, seq); Wizard::CloseDialog(); - HandlePackages(); + Storage::HandleProposalPackages(); } } Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=52384&r1=52383&r2=52384&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Tue Oct 21 10:50:40 2008 @@ -4512,6 +4512,32 @@ return pl; } +/** + * Takes care of selecting packages needed by storage + * in installation + * (replacement for HandlePackages in *_proposal clients) + */ + +global void HandleProposalPackages() +{ + //Use PackagesProposal to ensure that package selection + //does not get reset by this module (#433001) + import "PackagesProposal"; + + string proposal_ID = "storage_proposal"; + list<string> pkgs = AddPackageList(); + + //Set rather than Add, there might be some packs left over + //from previous 'MakeProposal' we don't need now + //This also covers the case when AddPackagesList returns [] or nil + PackagesProposal::SetResolvables( proposal_ID, `package, pkgs ); + + if( Stage::initial() ) + { + SaveUsedFs(); + } + +} global define list GetForeignPrimary() ``{ Modified: trunk/storage/storage/src/proposal/partitions_proposal.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/proposal/partitions_proposal.ycp?rev=52384&r1=52383&r2=52384&view=diff ============================================================================== --- trunk/storage/storage/src/proposal/partitions_proposal.ycp (original) +++ trunk/storage/storage/src/proposal/partitions_proposal.ycp Tue Oct 21 10:50:40 2008 @@ -23,25 +23,6 @@ map param = (map) WFM::Args(1); map ret = $[]; - define void HandlePackages() - ``{ - //Use PackagesProposal to ensure that package selection - //does not get reset by this module (#433001) - string proposal_ID = "partitions_proposal"; - PackagesProposal::RemoveResolvables( proposal_ID, `package, ["lvm2"] ); - - list<string> pkgs = Storage::AddPackageList(); - //Set rather than Add, there might be some packs left over - //from previous 'MakeProposal' we don't need now - //This also covers the case when AddPackagesList returns [] or nil - PackagesProposal::SetResolvables( proposal_ID, `package, pkgs ); - - if( Stage::initial() ) - { - Storage::SaveUsedFs(); - } - } - y2milestone( "func:%1 param:%2", func, param ); if( func == "MakeProposal" && Mode::autoinst() ) @@ -93,7 +74,7 @@ Specify mount points manually in the 'Partitioner' dialog."); ret["warning_level"] = `blocker; } - HandlePackages(); + Storage::HandleProposalPackages(); } else if ( func == "AskUser" ) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org