Skip to content

Commit

Permalink
Fixed setting unlimited maximum partition size
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 10, 2024
1 parent 05ea8cd commit 141ea6e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 11 additions & 1 deletion service/lib/agama/dbus/storage/volume_conversion/from_dbus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,19 @@ def convert
dbus_volume_issues.each { |i| logger.warn(i) }

builder = Agama::Storage::VolumeTemplatesBuilder.new_from_config(config)
builder.for(dbus_volume["MountPath"] || "").tap do |target|
ret = builder.for(dbus_volume["MountPath"] || "").tap do |target|
valid_dbus_properties.each { |p| conversion(target, p) }
end

# The `undefined` value is used as a value for unlimited size in the
# UI but D-Bus cannot send `undefined`, `nil` or `null` values. In
# that case the value is missing in the D-Bus data. Override the
# default from the config when the max size is missing.
if ret.max_size && !ret.max_size.unlimited? && !dbus_volume.has_key?("MaxSize")
ret.max_size = Y2Storage::DiskSize.unlimited
end

ret
end

private
Expand Down
6 changes: 6 additions & 0 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Apr 10 11:35:53 UTC 2024 - Ladislav Slezák <lslezak@suse.com>

- Fixed setting unlimited maximum partition size
(gh#openSUSE/agama#1065)

-------------------------------------------------------------------
Wed Apr 3 15:12:05 UTC 2024 - José Iván López González <jlopez@suse.com>

Expand Down

0 comments on commit 141ea6e

Please sign in to comment.