Skip to content

Commit

Permalink
Merge pull request #65 from aschnell/master
Browse files Browse the repository at this point in the history
- fixed transition between disk labels in proposal (bnc#875113)
  • Loading branch information
aschnell committed May 7, 2014
2 parents b5616b3 + d96baad commit abc1e68
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
6 changes: 6 additions & 0 deletions package/yast2-storage.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed May 07 18:12:42 CEST 2014 - aschnell@suse.de

- fixed transition between disk labels in proposal (bnc#875113)
- version 3.1.23

-------------------------------------------------------------------
Mon May 05 12:04:00 CEST 2014 - aschnell@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-storage.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-storage
Version: 3.1.22
Version: 3.1.23
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
21 changes: 11 additions & 10 deletions src/include/partitioning/auto_part_create.rb
@@ -1,6 +1,6 @@
# encoding: utf-8

# Copyright (c) 2012 Novell, Inc.
# Copyright (c) [2012-2014] Novell, Inc.
#
# All Rights Reserved.
#
Expand All @@ -19,21 +19,17 @@
# To contact Novell about this file by physical or electronic mail, you may
# find current contact information at www.novell.com.

# Module: auto_part_create.ycp
# Module: auto_part_create.rb
#
# Authors: Andreas Schwab (schwab@suse.de)
# Klaus Kämpf (kkaempf@suse.de)
#
# Purpose: This module creates the necessary partitions
# in the targetMap
#
# $Id$
#
# used globals
#
# defined functions

module Yast
module PartitioningAutoPartCreateInclude

def initialize_partitioning_auto_part_create(include_target)
textdomain "storage"

Expand All @@ -42,6 +38,7 @@ def initialize_partitioning_auto_part_create(include_target)
Yast.import "StorageProposal"
end


def create_partitions(tgmap, disk, partitions)
tgmap = deep_copy(tgmap)
disk = deep_copy(disk)
Expand All @@ -60,8 +57,11 @@ def create_partitions(tgmap, disk, partitions)
Builtins.y2milestone("create_partitions flex %1 vm %2", has_flex, vm)
Ops.set(disk, "partitions", partitions)
if StorageProposal.NeedNewDisklabel(disk)
Ops.set(tgmap, [Ops.get_string(disk, "device", ""), "disklabel"], "gpt")
Ops.set(tgmap, [Ops.get_string(disk, "device", ""), "del_ptable"], true)
# TODO understand reason why "label" and "disklabel" are needed
device = disk["device"]
disk["label"] = tgmap[device]["label"] = "gpt"
disk["disklabel"] = tgmap[device]["disklabel"] = "gpt"
disk["del_ptable"] = tgmap[device]["del_ptable"] = true
end
keep = Builtins.find(partitions) do |p|
!Ops.get_boolean(p, "delete", false) &&
Expand Down Expand Up @@ -205,5 +205,6 @@ def create_partitions(tgmap, disk, partitions)
Builtins.y2milestone("create_partitions ret %1", ret)
ret
end

end
end

0 comments on commit abc1e68

Please sign in to comment.