Skip to content

Commit

Permalink
Merge pull request #59 from yast/review_140627_default_filesystem
Browse files Browse the repository at this point in the history
setting default filesystem for native FS only
  • Loading branch information
schubi2 committed Jun 27, 2014
2 parents 0cf1e83 + d984426 commit a412f16
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
9 changes: 9 additions & 0 deletions package/autoyast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Jun 27 13:22:01 CEST 2014 - schubi@suse.de

- -- Set default filesystem for native FS only.
-- Do not format BIOS Grup partitions.
Side effects of bug bnc#880569
- 3.1.40


-------------------------------------------------------------------
Wed Jun 25 09:49:05 CEST 2014 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: autoyast2
Version: 3.1.39
Version: 3.1.40
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
13 changes: 12 additions & 1 deletion src/include/autoinstall/autopart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ def GetAllPartitions(device)
deep_copy(ret)
end

def propose_default_fs?(partition)
valid_fsids = [Partitions.fsid_gpt_boot, Partitions.fsid_native]

(!partition.has_key?("filesystem") ||
partition["filesystem"] == :none) &&
valid_fsids.include?(partition["filesystem_id"])
end

# Read partition data from XML control file
# @return [Hash] flexible propsal map
def preprocess_partition_config(xmlflex)
Expand Down Expand Up @@ -212,14 +220,17 @@ def preprocess_partition_config(xmlflex)

#Setting default filesystem if it has not been a part of autoinst.xml
#Bug 880569
if !partition.has_key?("filesystem") || partition["filesystem"] == :none
if propose_default_fs?(partition)
if partition["mount"] == Partitions.BootMount
partition["filesystem"] = Partitions.DefaultBootFs
else
partition["filesystem"] = Partitions.DefaultFs
end
end

# Do not format BIOS Grup partitions
partition["format"] = false if partition["filesystem_id"] == Partitions.fsid_bios_grub

if Ops.get_integer(partition, "size", 0) == -1
Ops.set(partition, "size", 0)
end
Expand Down

0 comments on commit a412f16

Please sign in to comment.