Skip to content

Commit

Permalink
Merge pull request #1266 from SUSE/sle-micro-rename
Browse files Browse the repository at this point in the history
Check for Micro for 6.0 and 6.1
  • Loading branch information
jesusbv authored Jan 9, 2025
2 parents 94d9641 + 2529ef5 commit 269f985
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def show
if @product.identifier.casecmp?('sles')
# if system has SLE Micro
# it should access to SLES products
sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('sle-micro') }
sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('micro') }
sle_micro_same_arch = @system.products.pluck(:arch).include?(@product.arch) if sle_micro
end
if @system.products.include?(@product) || sle_micro_same_arch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def all_allowed_paths(headers)
all_product_versions = @system.products.map { |p| Product.where(identifier: p.identifier, arch: p.arch) }.flatten
allowed_paths = all_product_versions.map { |prod| prod.repositories.pluck(:local_path) }.flatten
# Allow SLE Micro to access all free SLES repositories
sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('sle-micro') }
sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('micro') }
if sle_micro
system_products_archs = @system.products.pluck(:arch)
product_free_sles_modules_only = Product.where(
Expand All @@ -59,7 +59,7 @@ def all_allowed_paths(headers)
manager_prod = @system.products.any? do |p|
manager = p.identifier.downcase.include?('manager-server')
# SUMA 5.0 must have access to SUMA 4.3, 4.2 and so on
micro = p.identifier.downcase.include?('sle-micro')
micro = p.identifier.downcase.include?('micro')
instance_id_header = headers.fetch('X-Instance-Identifier', '').casecmp('suse-manager-server').zero?
instance_version_header = headers.fetch('X-Instance-Version', '0').split('.')[0] >= '5'
manager || (micro && instance_id_header && instance_version_header)
Expand Down
7 changes: 7 additions & 0 deletions package/obs/rmt-server.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Mon Dec 23 14:07:00 UTC 2024 - Luís Caparroz <[email protected]>

- Version 2.21
* Allow users to configure the SUMA product tree base URL to download
'product_tree.json' from host other than 'scc.suse.com'. (bsc#1234844)
* Update Micro check due to Micro 6.0 and 6.1 identifier to keep bsc#1230419 in place

-------------------------------------------------------------------
Mon Dec 23 08:03:56 UTC 2024 - Parag Jain <[email protected]>

Expand Down

0 comments on commit 269f985

Please sign in to comment.