Skip to content

Commit

Permalink
Do not change the product if it is the same
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Sep 12, 2023
1 parent e54b1db commit 51f0ba4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion service/lib/agama/dbus/software/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,14 @@ def initialize(backend, logger)
dbus_reader :selected_base_product, "s"

dbus_method :SelectProduct, "in ProductID:s" do |product_id|
logger.info "SelectProduct #{product_id}"
old_product_id = backend.product

if old_product_id == product_id
logger.info "Do not changing the product as it is still the same (#{product_id})"
return
end

logger.info "Selecting product #{product_id}"
select_product(product_id)
dbus_properties_changed(SOFTWARE_INTERFACE, { "SelectedBaseProduct" => product_id }, [])
update_validation # as different product means different software selection
Expand Down

0 comments on commit 51f0ba4

Please sign in to comment.