Hello community, here is the log from the commit of package yast2-storage-ng for openSUSE:Factory checked in at 2018-08-04 21:50:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old) and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-storage-ng" Sat Aug 4 21:50:51 2018 rev:27 rq:626869 version:4.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes 2018-07-24 17:29:13.259821983 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-storage-ng.new/yast2-storage-ng.changes 2018-08-04 21:50:51.948992066 +0200 @@ -1,0 +2,26 @@ +Tue Jul 31 15:03:42 UTC 2018 - schubi@suse.de + +- Warning if overwriting manually edited settings (bsc#1055756) +- 4.1.3 + +------------------------------------------------------------------- +Tue Jul 31 13:44:39 UTC 2018 - igonzalezsosa@suse.com + +- AutoYaST: export volume group name (lvm_group) when a MD RAID + device is used as a physical volume (bsc#1103113). +- 4.1.2 + +------------------------------------------------------------------- +Thu Jul 26 11:16:27 UTC 2018 - snwint@suse.com + +- make bsc#1098594 regression test work on s390 +- 4.1.1 + +------------------------------------------------------------------- +Wed Jul 25 21:41:48 CEST 2018 - aschnell@suse.com + +- use "Partition Table" instead of "Disk Label" in expert + partitioner (bsc#1070570) +- 4.1.0 + +------------------------------------------------------------------- Old: ---- yast2-storage-ng-4.0.199.tar.bz2 New: ---- yast2-storage-ng-4.1.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-storage-ng.spec ++++++ --- /var/tmp/diff_new_pack.5bh2YO/_old 2018-08-04 21:50:52.304992733 +0200 +++ /var/tmp/diff_new_pack.5bh2YO/_new 2018-08-04 21:50:52.308992741 +0200 @@ -17,7 +17,7 @@ Name: yast2-storage-ng -Version: 4.0.199 +Version: 4.1.3 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-storage-ng-4.0.199.tar.bz2 -> yast2-storage-ng-4.1.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/package/yast2-storage-ng.changes new/yast2-storage-ng-4.1.3/package/yast2-storage-ng.changes --- old/yast2-storage-ng-4.0.199/package/yast2-storage-ng.changes 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/package/yast2-storage-ng.changes 2018-08-01 10:42:52.000000000 +0200 @@ -1,4 +1,30 @@ ------------------------------------------------------------------- +Tue Jul 31 15:03:42 UTC 2018 - schubi@suse.de + +- Warning if overwriting manually edited settings (bsc#1055756) +- 4.1.3 + +------------------------------------------------------------------- +Tue Jul 31 13:44:39 UTC 2018 - igonzalezsosa@suse.com + +- AutoYaST: export volume group name (lvm_group) when a MD RAID + device is used as a physical volume (bsc#1103113). +- 4.1.2 + +------------------------------------------------------------------- +Thu Jul 26 11:16:27 UTC 2018 - snwint@suse.com + +- make bsc#1098594 regression test work on s390 +- 4.1.1 + +------------------------------------------------------------------- +Wed Jul 25 21:41:48 CEST 2018 - aschnell@suse.com + +- use "Partition Table" instead of "Disk Label" in expert + partitioner (bsc#1070570) +- 4.1.0 + +------------------------------------------------------------------- Mon Jul 23 13:55:03 UTC 2018 - snwint@suse.com - document XEN guest setup for testing (bsc#1085134) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/package/yast2-storage-ng.spec new/yast2-storage-ng-4.1.3/package/yast2-storage-ng.spec --- old/yast2-storage-ng-4.0.199/package/yast2-storage-ng.spec 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/package/yast2-storage-ng.spec 2018-08-01 10:42:52.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-storage-ng -Version: 4.0.199 +Version: 4.1.3 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/src/lib/y2partitioner/widgets/blk_device_attributes.rb new/yast2-storage-ng-4.1.3/src/lib/y2partitioner/widgets/blk_device_attributes.rb --- old/yast2-storage-ng-4.0.199/src/lib/y2partitioner/widgets/blk_device_attributes.rb 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/src/lib/y2partitioner/widgets/blk_device_attributes.rb 2018-08-01 10:42:52.000000000 +0200 @@ -150,7 +150,7 @@ # TRANSLATORS: partition table type information, where %s is replaced by # a partition table type (e.g., GPT, MS-DOS) - format(_("Disk Label: %s"), label) + format(_("Partition Table: %s"), label) end # Information about the filesystem type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/src/lib/y2partitioner/widgets/help.rb new/yast2-storage-ng-4.1.3/src/lib/y2partitioner/widgets/help.rb --- old/yast2-storage-ng-4.0.199/src/lib/y2partitioner/widgets/help.rb 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/src/lib/y2partitioner/widgets/help.rb 2018-08-01 10:42:52.000000000 +0200 @@ -31,8 +31,8 @@ device: N_("<b>Device</b> shows the kernel name of the\ndevice."), - disk_label: N_("<b>Disk Label</b> shows the partition table\ntype of the disk, " \ - "e.g <tt>MSDOS</tt> or <tt>GPT</tt>."), + disk_label: N_("<b>Partition Table</b> shows the partition table\ntype of the disk, " \ + "e.g <tt>MS-DOS</tt> or <tt>GPT</tt>."), encrypted: N_("<b>Encrypted</b> shows whether the device is\nencrypted."), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/src/lib/y2storage/autoinst_profile/drive_section.rb new/yast2-storage-ng-4.1.3/src/lib/y2storage/autoinst_profile/drive_section.rb --- old/yast2-storage-ng-4.0.199/src/lib/y2storage/autoinst_profile/drive_section.rb 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/src/lib/y2storage/autoinst_profile/drive_section.rb 2018-08-01 10:42:52.000000000 +0200 @@ -204,7 +204,10 @@ return false if disk.partitions.empty? @type = :CT_DISK + # s390 prefers udev by-path device names (bsc#591603) @device = Yast::Arch.s390 ? disk.udev_full_paths.first : disk.name + # if disk.udev_full_paths.first is nil go for disk.name anyway + @device ||= disk.name @disklabel = disk.partition_table.type.to_s @partitions = partitions_from_disk(disk) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/src/lib/y2storage/autoinst_profile/partition_section.rb new/yast2-storage-ng-4.1.3/src/lib/y2storage/autoinst_profile/partition_section.rb --- old/yast2-storage-ng-4.0.199/src/lib/y2storage/autoinst_profile/partition_section.rb 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/src/lib/y2storage/autoinst_profile/partition_section.rb 2018-08-01 10:42:52.000000000 +0200 @@ -299,7 +299,7 @@ @partition_nr = partition.number @partition_type = "primary" if partition.type.is?(:primary) @partition_id = partition_id_from(partition) - @lvm_group = partition.lvm_pv.lvm_vg.basename if partition.lvm_pv && partition.lvm_pv.lvm_vg + @lvm_group = lvm_group_name(partition) @raid_name = partition.md.name if partition.md end @@ -315,6 +315,7 @@ def init_md_fields(md) @partition_nr = md.number if md.numeric? @raid_options = RaidOptionsSection.new_from_storage(md) + @lvm_group = lvm_group_name(md) end def init_encryption_fields(partition) @@ -409,6 +410,16 @@ subvolumes = SubvolSpecification.list_from_control_xml(hashes) subvolumes.reject { |s| s.path == "@" } end + + # Returns the volume group associated to a given device + # + # @param device [Y2Storage::Partition,Y2Storage::Md] Partition or MD RAID device. + # @return [String,nil] Volume group; nil if it is not used as a physical volume or does + # not belong to any volume group. + def lvm_group_name(device) + return nil if device.lvm_pv.nil? || device.lvm_pv.lvm_vg.nil? + device.lvm_pv.lvm_vg.basename + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/src/lib/y2storage/clients/inst_disk_proposal.rb new/yast2-storage-ng-4.1.3/src/lib/y2storage/clients/inst_disk_proposal.rb --- old/yast2-storage-ng-4.0.199/src/lib/y2storage/clients/inst_disk_proposal.rb 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/src/lib/y2storage/clients/inst_disk_proposal.rb 2018-08-01 10:42:52.000000000 +0200 @@ -45,6 +45,8 @@ include InstDialogMixin include PartitioningFeatures + attr_reader :manual_changed # Settings has been changed by user + def initialize textdomain "storage" @@ -60,6 +62,7 @@ def run log.info("BEGIN of inst_disk_proposal") + @manual_changed = false until [:back, :next, :abort].include?(@result) dialog = Dialogs::Proposal.new(@proposal, @devicegraph, excluded_buttons: excluded_buttons) @@ -88,6 +91,19 @@ # @return [Integer] attr_reader :initial_staging_revision + # The user has changed partition settings. + # Asking if these changes can be overwritten. + def overwrite_manual_settings? + return true unless manual_changed + ret = Popup.YesNo(_( + "Computing this proposal will overwrite manual changes \n"\ + "done so far. Continue with computing proposal?" + )) + log.info "overwrite_manual_settings? return #{ret}" + @manual_changed = false if ret # reset for next change + ret + end + def save_to_storage_manager if @proposal log.info "Storing accepted proposal" @@ -100,6 +116,7 @@ end def guided_setup + return unless overwrite_manual_settings? settings = @proposal ? @proposal.settings : new_settings dialog = Dialogs::GuidedSetup.new(settings, probed_analyzer) case dialog.run @@ -117,6 +134,7 @@ dialog_result = without_title_on_left { dialog.run } actions_after_partitioner(dialog.device_graph, dialog_result) + @manual_changed = true if @result != :abort end # Actions to perform after running the Partitioner diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/test/y2storage/autoinst_profile/partition_section_test.rb new/yast2-storage-ng-4.1.3/test/y2storage/autoinst_profile/partition_section_test.rb --- old/yast2-storage-ng-4.0.199/test/y2storage/autoinst_profile/partition_section_test.rb 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/test/y2storage/autoinst_profile/partition_section_test.rb 2018-08-01 10:42:52.000000000 +0200 @@ -131,7 +131,8 @@ numeric?: numeric?, number: 0, encrypted?: false, - filesystem: filesystem + filesystem: filesystem, + lvm_pv: lvm_pv ) end @@ -147,6 +148,7 @@ end let(:numeric?) { true } + let(:lvm_pv) { nil } before do allow(md).to receive(:is?) { |t| t == :md } @@ -177,6 +179,30 @@ expect(section.partition_nr).to be_nil end end + + context "when it is used as an LVM physical volume" do + let(:lvm_vg) { instance_double(Y2Storage::LvmVg, basename: "vg0") } + let(:lvm_pv) do + instance_double( + Y2Storage::LvmPv, + lvm_vg: lvm_vg + ) + end + + it "initializes #lvm_group" do + section = described_class.new_from_storage(md) + expect(section.lvm_group).to eq("vg0") + end + + context "but it does not belong to any volume group" do + let(:lvm_vg) { nil } + + it "does not initialize #lvm_group" do + section = described_class.new_from_storage(md) + expect(section.lvm_group).to be_nil + end + end + end end context "when filesystem is btrfs" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.0.199/test/y2storage/clients/inst_disk_proposal_test.rb new/yast2-storage-ng-4.1.3/test/y2storage/clients/inst_disk_proposal_test.rb --- old/yast2-storage-ng-4.0.199/test/y2storage/clients/inst_disk_proposal_test.rb 2018-07-23 16:25:46.000000000 +0200 +++ new/yast2-storage-ng-4.1.3/test/y2storage/clients/inst_disk_proposal_test.rb 2018-08-01 10:42:52.000000000 +0200 @@ -510,6 +510,10 @@ it "aborts" do expect(client.run).to eq :abort end + it "recognizes that the user has NOT changed settings" do + client.run + expect(client.manual_changed).to eq(false) + end end context "if the expert partitioner returns :back" do @@ -564,6 +568,15 @@ .and_return(second_proposal_dialog) client.run end + it "recognizes that the user has changed settings" do + allow(Y2Storage::Dialogs::Proposal).to receive(:new).once + .and_return(proposal_dialog) + allow(Y2Storage::Dialogs::Proposal).to receive(:new).once + .with(nil, new_devicegraph, anything) + .and_return(second_proposal_dialog) + client.run + expect(client.manual_changed).to eq(true) + end end end end