Skip to content

Commit

Permalink
Fixed regression in the add-on repository names (bsc#1175374)
Browse files Browse the repository at this point in the history
...during AutoYaST installation

- 4.2.16
  • Loading branch information
lslezak committed Sep 3, 2020
1 parent 25b2273 commit eb4cc37
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
7 changes: 7 additions & 0 deletions package/yast2-add-on.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 3 07:11:47 UTC 2020 - Ladislav Slezák <lslezak@suse.cz>

- Fixed regression in the add-on repository names in AutoYaST
installation (bsc#1175374, related to bsc#1172477)
- 4.2.16

-------------------------------------------------------------------
Tue Jan 28 09:30:52 CET 2020 - schubi@suse.de

Expand Down
4 changes: 3 additions & 1 deletion package/yast2-add-on.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-add-on
Version: 4.2.15
Version: 4.2.16
Release: 0
Summary: YaST2 - Add-On media installation code
License: GPL-2.0-only
Expand All @@ -41,6 +41,8 @@ Requires: yast2-country
Requires: yast2-installation
# Packager ProductLicense#HandleLicenseDialogRet allowing "refuse" action
Requires: yast2-packager >= 4.2.16
# "raw_name" in Pkg.SourceEditGet/Set()
Requires: yast2-pkg-bindings >= 4.2.8
Requires: yast2-ruby-bindings >= 1.0.0

Obsoletes: yast2-add-on-devel-doc
Expand Down
6 changes: 3 additions & 3 deletions src/lib/add-on/clients/add-on_auto.rb
Expand Up @@ -309,10 +309,10 @@ def adjust_source_attributes(add_on, source_id)

return if repo.nil?

repo["name"] = preferred_name_for(add_on, repo)
repo["raw_name"] = preferred_name_for(add_on, repo)
repo["priority"] = add_on["priority"] if add_on.key?("priority")

log.info("Preferred name: #{repo["name"]}")
log.info("Preferred name: #{repo["raw_name"]}")

Pkg.SourceEditSet(sources)
end
Expand Down Expand Up @@ -344,7 +344,7 @@ def preferred_name_for(add_on, repo)
found_repo = repos_at_url.find { |r| r[1] == product_dir }
return found_repo[0] if found_repo

repo["name"]
repo["raw_name"]
end

# Installs given product
Expand Down
3 changes: 2 additions & 1 deletion test/y2add_on/clients/add-on_auto_test.rb
Expand Up @@ -285,7 +285,8 @@
"autorefresh" => true,
"enabled" => true,
"keeppackaged" => false,
"name" => "Updated repo",
"name" => "repo_to_be_updated",
"raw_name" => "Updated repo",
"priority" => 20,
"service" => ""
},
Expand Down

0 comments on commit eb4cc37

Please sign in to comment.