@@ -79,7 +79,7 @@ def initialize(backend, logger: nil)
7979 dbus_method ( :GetProposal , "out proposal:s" ) { recover_proposal }
8080 dbus_method ( :GetIssues , "out issues:s" ) { recover_issues }
8181 dbus_signal ( :SystemChanged , "system:s" )
82- dbus_signal ( :ProposalChanged )
82+ dbus_signal ( :ProposalChanged , "proposal:s" )
8383 dbus_signal ( :IssuesChanged )
8484 dbus_signal ( :ProgressChanged , "progress:s" )
8585 dbus_signal ( :ProgressFinished )
@@ -130,10 +130,7 @@ def configure_product(id)
130130 end
131131
132132 next_progress_step ( CONFIGURING_STEP )
133- backend . configure
134- self . ProposalChanged
135-
136- finish_progress
133+ calculate_proposal
137134 end
138135
139136 # Implementation for the API method #Install.
@@ -208,10 +205,7 @@ def configure(serialized_config)
208205 start_progress ( 1 , CONFIGURING_STEP )
209206
210207 config_json = JSON . parse ( serialized_config , symbolize_names : true )
211- backend . configure ( config_json )
212- self . ProposalChanged
213-
214- finish_progress
208+ calculate_proposal ( config_json )
215209 end
216210
217211 # Applies the given serialized config model according to the JSON schema.
@@ -227,10 +221,7 @@ def configure_with_model(serialized_model)
227221 storage_system : proposal . storage_system
228222 ) . convert
229223 config_json = { storage : Agama ::Storage ::ConfigConversions ::ToJSON . new ( config ) . convert }
230- backend . configure ( config_json )
231- self . ProposalChanged
232-
233- finish_progress
224+ calculate_proposal ( config_json )
234225 end
235226
236227 # Solves the given serialized config model.
@@ -400,7 +391,16 @@ def configure_with_current
400391 return unless config_json
401392
402393 configure ( config_json )
403- self . ProposalChanged
394+ end
395+
396+ # @see #configure
397+ # @see #configure_with_model
398+ #
399+ # @param config_json [Hash, nil] see Agama::Storage::Manager#configure
400+ def calculate_proposal ( config_json = nil )
401+ backend . configure ( config_json )
402+ self . ProposalChanged ( recover_proposal )
403+ finish_progress
404404 end
405405
406406 # JSON representation of the given devicegraph from StorageManager
0 commit comments