Skip to content

Commit

Permalink
Merge 33ac5f7 into ff149b0
Browse files Browse the repository at this point in the history
  • Loading branch information
wfeldt committed Aug 31, 2018
2 parents ff149b0 + 33ac5f7 commit 94a8fc0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions package/yast2-packager.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 31 14:03:43 UTC 2018 - snwint@suse.com

- allow hard disks with file systems to be selected in add-on dialog (bsc#1003263)
- 4.1.3

-------------------------------------------------------------------
Wed Aug 22 14:14:44 CEST 2018 - schubi@suse.de

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


Name: yast2-packager
Version: 4.1.2
Version: 4.1.3
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
9 changes: 6 additions & 3 deletions src/modules/SourceDialogs.rb
Expand Up @@ -1076,13 +1076,16 @@ def DirWidget
end

def DetectPartitions(disk_id)
# this kills things like /dev/fd0 (that don't have a disk_id)
return [] if disk_id.empty?

command = Builtins.sformat("ls %1-part*", disk_id)

out = Convert.to_map(SCR.Execute(path(".target.bash_output"), command))

if Ops.get_integer(out, "exit", -1).nonzero?
Builtins.y2error("Command %1 failed", command)
return []
Builtins.y2milestone("no partitions on %1, using full disk", disk_id)
return [disk_id]
end

ret = Builtins.splitstring(Ops.get_string(out, "stdout", ""), "\n")
Expand Down Expand Up @@ -1173,7 +1176,7 @@ def DiskSelectionList(disks, selected)
dev = Ops.get_string(disk, "dev", "")
Builtins.foreach(Ops.get_list(disk, "partitions", [])) do |part|
partnum = Builtins.regexpsub(part, ".*-part([0-9]*)$", "\\1")
disk_label = Ops.add(label, Builtins.sformat(" (%1%2)", dev, partnum))
disk_label = "#{label} (#{dev}#{partnum})"
found ||= part == selected
ret = Builtins.add(ret, Item(Id(part), disk_label, part == selected))
end
Expand Down

0 comments on commit 94a8fc0

Please sign in to comment.