Hello community, here is the log from the commit of package yast2-storage for openSUSE:Factory checked in at 2016-11-23 13:36:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-storage (Old) and /work/SRC/openSUSE:Factory/.yast2-storage.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-storage/yast2-storage.changes 2016-11-07 13:24:57.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-storage.new/yast2-storage.changes 2016-11-23 13:36:05.000000000 +0100 @@ -1,0 +2,9 @@ +Thu Nov 17 13:40:37 CET 2016 - [email protected] + +- Don't show [Edit Proposal Settings] button if disabled + in control.xml (Fate#321736) +- Added warning popup for expert partitioner if configured + in control.xml +- 3.2.1 + +------------------------------------------------------------------- Old: ---- yast2-storage-3.2.0.tar.bz2 New: ---- yast2-storage-3.2.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-storage.spec ++++++ --- /var/tmp/diff_new_pack.TfEkpX/_old 2016-11-23 13:36:07.000000000 +0100 +++ /var/tmp/diff_new_pack.TfEkpX/_new 2016-11-23 13:36:07.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-storage -Version: 3.2.0 +Version: 3.2.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-storage-3.2.0.tar.bz2 -> yast2-storage-3.2.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-3.2.0/package/yast2-storage.changes new/yast2-storage-3.2.1/package/yast2-storage.changes --- old/yast2-storage-3.2.0/package/yast2-storage.changes 2016-11-04 17:06:56.000000000 +0100 +++ new/yast2-storage-3.2.1/package/yast2-storage.changes 2016-11-21 16:11:54.000000000 +0100 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Thu Nov 17 13:40:37 CET 2016 - [email protected] + +- Don't show [Edit Proposal Settings] button if disabled + in control.xml (Fate#321736) +- Added warning popup for expert partitioner if configured + in control.xml +- 3.2.1 + +------------------------------------------------------------------- Mon Oct 31 13:11:04 UTC 2016 - [email protected] - Improve support to redefine/detect the Btrfs default subvolume diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-3.2.0/package/yast2-storage.spec new/yast2-storage-3.2.1/package/yast2-storage.spec --- old/yast2-storage-3.2.0/package/yast2-storage.spec 2016-11-04 17:06:56.000000000 +0100 +++ new/yast2-storage-3.2.1/package/yast2-storage.spec 2016-11-21 16:11:54.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-storage -Version: 3.2.0 +Version: 3.2.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-3.2.0/src/clients/inst_disk_proposal.rb new/yast2-storage-3.2.1/src/clients/inst_disk_proposal.rb --- old/yast2-storage-3.2.0/src/clients/inst_disk_proposal.rb 2016-11-04 17:06:56.000000000 +0100 +++ new/yast2-storage-3.2.1/src/clients/inst_disk_proposal.rb 2016-11-21 16:11:54.000000000 +0100 @@ -72,7 +72,7 @@ end - # Title for dialogue + # Title for dialog @title = _("Suggested Partitioning") # Radiobutton for partition dialog @modify_str = _("&Expert Partitioner...") @@ -129,12 +129,13 @@ Builtins.y2milestone("current proposal: %1", @changes) - @rframe = VBox( - VSpacing(0.2), - # TRANSLATORS: button text - PushButton(Id(:settings), _("Edit Proposal Settings")), - HSpacing(0.2) - ) + @rframe = StorageProposal.GetProposalSettingsEditable ? + VBox( + VSpacing(0.2), + # TRANSLATORS: button text + PushButton(Id(:settings), _("Edit Proposal Settings")), + HSpacing(0.2) + ) : Empty() @bframe = VBox( PushButton(Id(:detailed), @detailed_str), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-3.2.0/src/clients/inst_target_part.rb new/yast2-storage-3.2.1/src/clients/inst_target_part.rb --- old/yast2-storage-3.2.0/src/clients/inst_target_part.rb 2016-11-04 17:06:56.000000000 +0100 +++ new/yast2-storage-3.2.1/src/clients/inst_target_part.rb 2016-11-21 16:11:54.000000000 +0100 @@ -161,7 +161,7 @@ Ops.get_integer(@target, "cyl_size", 1) ) @vbox = Builtins.add(@vbox, VSpacing(1.5)) - @vbox = Builtins.add(@vbox, PushButton(Id(:settings), _("Edit Proposal Settings"))) + @vbox = Builtins.add(@vbox, edit_proposal_settings_button) Builtins.y2milestone("can resize !") else # this is the normal case @@ -175,14 +175,14 @@ Ops.get_term(@tmp, "term", VBox()), VBox( VSpacing(1.5), - PushButton(Id(:settings), _("Edit Proposal Settings")) + edit_proposal_settings_button ) ) end else @vbox = create_whole_disk_dialog @vbox = Builtins.add(@vbox, VSpacing(1.5)) - @vbox = Builtins.add(@vbox, PushButton(Id(:settings), _("Edit Proposal Settings"))) + @vbox = Builtins.add(@vbox, edit_proposal_settings_button) end # Since resize case and normal case have different help texts we need @@ -491,6 +491,14 @@ ret end + + # Return a term for a PushButton("Edit Proposal Settings") + # or Empty() if that button is disabled in control.xml. + # + def edit_proposal_settings_button + return Empty() unless StorageProposal.GetProposalSettingsEditable + PushButton(Id(:settings), _("Edit Proposal Settings")) + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-3.2.0/src/clients/inst_target_selection.rb new/yast2-storage-3.2.1/src/clients/inst_target_selection.rb --- old/yast2-storage-3.2.0/src/clients/inst_target_selection.rb 2016-11-04 17:06:56.000000000 +0100 +++ new/yast2-storage-3.2.1/src/clients/inst_target_selection.rb 2016-11-21 16:11:54.000000000 +0100 @@ -46,6 +46,7 @@ Yast.import "Partitions" Yast.import "Wizard" Yast.import "Storage" + Yast.import "StorageProposal" Yast.import "StorageFields" Yast.include self, "partitioning/custom_part_helptexts.rb" @@ -232,15 +233,12 @@ @sym = :none begin @ret = Wizard.UserInput - + # Always fetch widget values from the widget - + # never duplicate a widget's status by internal variables! + @custom_val = UI.QueryWidget(Id("CUSTOM"), :Value) Builtins.y2milestone("ret %1", @ret) - if Ops.is_string?(@ret) && Convert.to_string(@ret) == "CUSTOM" - #UI::ChangeWidget( `id(`disklist), `CurrentItem, "" ); - @custom_val = !@custom_val - end - @sym = :none @sym = Convert.to_symbol(@ret) if Ops.is_symbol?(@ret) @@ -326,6 +324,15 @@ Storage.ResetOndiskTarget if Storage.GetPartMode != "USE_DISK" Storage.SetCustomDisplay(true) end + if @custom_val && StorageProposal.GetExpertPartitionerWarning + if show_expert_partitioner_warning + Builtins.y2milestone("User confirmed to enter expert partitioner") + else + UI.ChangeWidget(Id("CUSTOM"), :Value, false) + @custom_val = false + @sym = :again + end + end end # if (ret == next) end until @sym == :next || @sym == :back || @sym == :cancel if @sym != :next @@ -335,6 +342,22 @@ Storage.SaveExitKey(@sym) @sym end + + # Show a warning popup for the expert partitioner. + # + # @return [Boolean] user confirmed or not + # + def show_expert_partitioner_warning + # Warning popup about using the expert partitioner + @msg = _( + "This is for experts only.\n" + + "You might lose support if you use this!\n" + + "\n" + + "Please refer to the manual to make sure your custom\n" + + "partitioning meets the requirements of this product." + ) + Popup.ContinueCancelHeadline(Label.WarningMsg, @msg) + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-3.2.0/src/modules/StorageProposal.rb new/yast2-storage-3.2.1/src/modules/StorageProposal.rb --- old/yast2-storage-3.2.0/src/modules/StorageProposal.rb 2016-11-04 17:06:56.000000000 +0100 +++ new/yast2-storage-3.2.1/src/modules/StorageProposal.rb 2016-11-21 16:11:54.000000000 +0100 @@ -42,7 +42,6 @@ include Yast::Logger include Yast::StorageHelpers::TargetMapFormatter - def main textdomain "storage" @@ -74,6 +73,9 @@ @proposal_password = "" @proposal_create_vg = false + @proposal_settings_editable = true + @expert_partitioner_warning = false + @cfg_xml = {} @swapable = {} @@ -163,6 +165,14 @@ Builtins.y2milestone("SetProposalPassword") end + def GetProposalSettingsEditable + @proposal_settings_editable + end + + def GetExpertPartitionerWarning + @expert_partitioner_warning + end + def SetProposalDefault(home_only) # on S/390 there is no space for dedicated /home partition @@ -330,6 +340,19 @@ Builtins.y2milestone("GetControlCfg after : %1", ret) end + xml = ProductFeatures.GetSection("partitioning") + if xml.key?("proposal_settings_editable") + # ProductFetures.GetBooleanFeature cannot tell the difference between a missing value + # and one that is explicitly set to 'false' + @proposal_settings_editable = + ProductFeatures.GetBooleanFeature("partitioning", "proposal_settings_editable") + end + + if xml.key?("expert_partitioner_warning") + @expert_partitioner_warning = + ProductFeatures.GetBooleanFeature("partitioning", "expert_partitioner_warning") + end + deep_copy(ret) end
