Skip to content

Commit

Permalink
Merge pull request #104 from yast/merge_sp2
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Sep 16, 2020
2 parents e4f5a91 + bf86c5d commit 1924e27
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
7 changes: 7 additions & 0 deletions package/yast2-add-on.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Sep 16 12:22:10 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.3.5

-------------------------------------------------------------------
Mon Aug 10 17:28:28 CEST 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.3.4
Version: 4.3.5
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
8 changes: 4 additions & 4 deletions src/lib/add-on/clients/add-on_auto.rb
Expand Up @@ -314,10 +314,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 All @@ -331,7 +331,7 @@ def adjust_source_attributes(add_on, source_id)
# * name of given repo
#
# @param [Hash] addon
# @param [Array] repo
# @param [Hash] repo
#
# @return [String] preferred name for add-on/repo
def preferred_name_for(add_on, repo)
Expand All @@ -349,7 +349,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 @@ -306,7 +306,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 1924e27

Please sign in to comment.