commit yast2-storage-ng for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-storage-ng for openSUSE:Factory checked in at 2021-02-01 14:41:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old) and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-storage-ng" Mon Feb 1 14:41:39 2021 rev:100 rq:867706 version:4.3.41 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes 2021-01-25 18:23:32.684422285 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.28504/yast2-storage-ng.changes 2021-02-01 14:41:42.916668787 +0100 @@ -1,0 +2,7 @@ +Thu Jan 28 17:07:25 UTC 2021 - Ancor Gonzalez Sosa <ancor@suse.com> + +- AutoYaST UI: improved visualization of some partition sections + in the left tree (related to jsc#SLE-11308). +- 4.3.41 + +------------------------------------------------------------------- Old: ---- yast2-storage-ng-4.3.40.tar.bz2 New: ---- yast2-storage-ng-4.3.41.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-storage-ng.spec ++++++ --- /var/tmp/diff_new_pack.tVWrVC/_old 2021-02-01 14:41:43.832670100 +0100 +++ /var/tmp/diff_new_pack.tVWrVC/_new 2021-02-01 14:41:43.832670100 +0100 @@ -17,7 +17,7 @@ Name: yast2-storage-ng -Version: 4.3.40 +Version: 4.3.41 Release: 0 Summary: YaST2 - Storage Configuration License: GPL-2.0-only OR GPL-3.0-only ++++++ yast2-storage-ng-4.3.40.tar.bz2 -> yast2-storage-ng-4.3.41.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.40/package/yast2-storage-ng.changes new/yast2-storage-ng-4.3.41/package/yast2-storage-ng.changes --- old/yast2-storage-ng-4.3.40/package/yast2-storage-ng.changes 2021-01-25 14:01:23.000000000 +0100 +++ new/yast2-storage-ng-4.3.41/package/yast2-storage-ng.changes 2021-01-29 13:21:24.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Jan 28 17:07:25 UTC 2021 - Ancor Gonzalez Sosa <ancor@suse.com> + +- AutoYaST UI: improved visualization of some partition sections + in the left tree (related to jsc#SLE-11308). +- 4.3.41 + +------------------------------------------------------------------- Mon Jan 25 11:52:18 UTC 2021 - Jos�� Iv��n L��pez Gonz��lez <jlopez@suse.com> - Partitioner: fix typo calling to popup (bsc#1181348). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.40/package/yast2-storage-ng.spec new/yast2-storage-ng-4.3.41/package/yast2-storage-ng.spec --- old/yast2-storage-ng-4.3.40/package/yast2-storage-ng.spec 2021-01-25 14:01:23.000000000 +0100 +++ new/yast2-storage-ng-4.3.41/package/yast2-storage-ng.spec 2021-01-29 13:21:24.000000000 +0100 @@ -16,7 +16,7 @@ # Name: yast2-storage-ng -Version: 4.3.40 +Version: 4.3.41 Release: 0 Summary: YaST2 - Storage Configuration License: GPL-2.0-only OR GPL-3.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.40/src/lib/y2storage/autoinst_profile/drive_section.rb new/yast2-storage-ng-4.3.41/src/lib/y2storage/autoinst_profile/drive_section.rb --- old/yast2-storage-ng-4.3.40/src/lib/y2storage/autoinst_profile/drive_section.rb 2021-01-25 14:01:23.000000000 +0100 +++ new/yast2-storage-ng-4.3.41/src/lib/y2storage/autoinst_profile/drive_section.rb 2021-01-29 13:21:24.000000000 +0100 @@ -264,6 +264,10 @@ # Determine whether the partition table is explicitly not wanted # + # This method only makes sense for drive sections describing block devices that could be + # partitioned or not (like disks, RAIDs, etc.). For a more general method see + # {#master_partition_drive?}. + # # @note When the disklabel is set to 'none', a partition table should not be created. # For backward compatibility reasons, setting partition_nr to 0 has the same effect. # When no disklabel is set, this method returns false. @@ -287,12 +291,12 @@ # Returns the partition which contains the configuration for the whole disk # - # @return [PartitionSection,nil] Partition section for the whole disk; it returns - # nil if the device will use a partition table. + # @return [PartitionSection,nil] Partition section for the whole disk; it returns nil if + # the device will use a partition table or if the drive contains no partition sections # # @see #partition_table? def master_partition - return unless unwanted_partitions? + return unless master_partition_drive? partitions.find { |i| i.partition_nr == 0 } || partitions.first end @@ -328,6 +332,21 @@ device_name == "/dev/nfs" end + # Whether this drive section is expected to contain only one partition subsection + # containing the configuration of the whole disk + # + # @return [Boolean] true for non-partitioned block devices and also for drives + # describing a concrete filesystem + def master_partition_drive? + # In the old undocumented format, NFS mounts were represented by partition sections + return false if nfs_name?(device) + + # In the new NFS format and in btrfs, only one partition section makes sense + return true if [:CT_NFS, :CT_BTRFS].include?(type) + + unwanted_partitions? + end + # Method used by {.new_from_storage} to populate the attributes when # cloning a disk or DASD device. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.40/test/y2storage/autoinst_profile/drive_section_test.rb new/yast2-storage-ng-4.3.41/test/y2storage/autoinst_profile/drive_section_test.rb --- old/yast2-storage-ng-4.3.40/test/y2storage/autoinst_profile/drive_section_test.rb 2021-01-25 14:01:23.000000000 +0100 +++ new/yast2-storage-ng-4.3.41/test/y2storage/autoinst_profile/drive_section_test.rb 2021-01-29 13:21:24.000000000 +0100 @@ -1053,13 +1053,10 @@ let(:home_spec) { Y2Storage::AutoinstProfile::PartitionSection.new } - before do - section.partitions = [home_spec, part0_spec] - end - context "when diskabel is set to 'none'" do before do section.disklabel = "none" + section.partitions = [home_spec, part0_spec] end it "returns the partition which partition_nr is set to '0'" do @@ -1088,6 +1085,10 @@ end context "when a partition section has the partition_nr set to '0'" do + before do + section.partitions = [home_spec, part0_spec] + end + it "returns that partition section" do expect(section.master_partition).to eq(part0_spec) end @@ -1102,6 +1103,26 @@ end end end + + context "for a drive describing a multi-device btrfs" do + let(:scenario) { "btrfs2-devicegraph.xml" } + let(:section) { described_class.new_from_storage(filesystem) } + let(:filesystem) { device("sdb1").filesystem } + + before do + # The disklabel attribute is irrelevant here. Even if it's omitted, everything should work + section.disklabel = nil + end + + it "returns the first partition section" do + expect(section.master_partition.mount).to eq "/test" + end + + it "returns nil if there are no partitions" do + section.partitions = [] + expect(section.master_partition).to be_nil + end + end end describe "#section_path" do
participants (1)
-
Source-Sync