Skip to content

Commit

Permalink
Display the add-on selection dialog even when a DUD add-on is present…
Browse files Browse the repository at this point in the history
… (bsc#1174562)
  • Loading branch information
lslezak committed Sep 9, 2020
1 parent 25b2273 commit e4ec16d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/include/add-on/add-on-workflow.rb
Expand Up @@ -910,7 +910,7 @@ def RunAddOnMainDialog(enable_back, enable_next, enable_abort, back_button, next
ret = nil

not_enough_memory = Stage.initial && HasInsufficientMemory()
no_addons = Builtins.size(AddOnProduct.add_on_products) == 0
no_addons = product_addons.empty?

# bugzilla #239630
# It might be dangerous to add more installation sources in installation
Expand Down Expand Up @@ -1909,7 +1909,7 @@ def media_type_selection
# @return [Boolean] `true` if the addons should be offered automatically
#
def offer_media_addons?
if !AddOnProduct.add_on_products.empty? || !Stage.initial || !Y2Packager::MediumType.offline?
if !product_addons.empty? || !Stage.initial || !Y2Packager::MediumType.offline?
return false
end

Expand Down Expand Up @@ -1941,5 +1941,12 @@ def product_label(product)
# fallback to the internal product name
selected_product&.display_name || product
end

# return product addons (i.e. filter out the Driver Update add-ons)
# @return [Array<Hash>] the addons without the driver update add-ons
def product_addons
# the product name contains the DUD number, e.g. it is "Driver Update 0" for the first DUD
AddOnProduct.add_on_products.reject{|a| a["product"].start_with?("Driver Update")}
end
end
end

0 comments on commit e4ec16d

Please sign in to comment.