Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 3 additions & 10 deletions service/lib/agama/dbus/storage/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class Manager < BaseObject
def initialize(backend, logger)
super(PATH, logger: logger)
@backend = backend
@product_mount_points = read_product_mount_points
@encryption_methods = read_encryption_methods

register_storage_callbacks
Expand Down Expand Up @@ -122,10 +121,10 @@ def available_devices
proposal.available_devices.map { |d| system_devices_tree.path_for(d) }
end

# Reads the list of meaningful mount points for the current product.
# Meaningful mount points for the current product.
#
# @return [Array<String>]
def read_product_mount_points
def product_mount_points
volume_templates_builder
.all
.map(&:mount_path)
Expand Down Expand Up @@ -178,8 +177,7 @@ def calculate_proposal(dbus_settings)
dbus_interface PROPOSAL_CALCULATOR_INTERFACE do
dbus_reader :available_devices, "ao"

# PropertiesChanged signal if the product changes, see {#register_software_callbacks}.
dbus_reader_attr_accessor :product_mount_points, "as"
dbus_reader :product_mount_points, "as"

# PropertiesChanged signal if software is probed, see {#register_software_callbacks}.
dbus_reader_attr_accessor :encryption_methods, "as"
Expand Down Expand Up @@ -322,11 +320,6 @@ def register_iscsi_callbacks
end

def register_software_callbacks
backend.software.on_product_selected do
# A PropertiesChanged signal is emitted (see ::DBus::Object.dbus_reader_attr_accessor).
self.product_mount_points = read_product_mount_points
end

backend.software.on_probe_finished do
# A PropertiesChanged signal is emitted (see ::DBus::Object.dbus_reader_attr_accessor).
self.encryption_methods = read_encryption_methods
Expand Down
5 changes: 5 additions & 0 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon May 27 12:43:49 UTC 2024 - José Iván López González <jlopez@suse.com>

- Update product mount points as part of the probing (bsc#1225348).

-------------------------------------------------------------------
Tue May 21 05:32:46 UTC 2024 - José Iván López González <jlopez@suse.com>

Expand Down
4 changes: 1 addition & 3 deletions service/test/agama/dbus/storage/manager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@
end

let(:software) do
instance_double(Agama::DBus::Clients::Software,
on_product_selected: nil,
on_probe_finished: nil)
instance_double(Agama::DBus::Clients::Software, on_probe_finished: nil)
end

before do
Expand Down