Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed setting unlimited maximum partition size #1142

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.key?("MaxSize")
ret.max_size = Y2Storage::DiskSize.unlimited
end

ret
lslezak marked this conversation as resolved.
Show resolved Hide resolved
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 <[email protected]>

- 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 <[email protected]>

Expand Down
Loading