Skip to content

Commit

Permalink
avoid suplicating release notes for products (bsc#935599)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsrain committed Jul 24, 2015
1 parent d15c44b commit 17532ae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions package/yast2-installation.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jul 24 13:01:22 UTC 2015 - jsrain@suse.cz

- avoid suplicating release notes for products (bsc#935599)
- 3.1.151

-------------------------------------------------------------------
Tue Jul 21 09:16:03 UTC 2015 - mvidner@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 3.1.150
Version: 3.1.151
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
10 changes: 5 additions & 5 deletions src/lib/installation/clients/inst_download_release_notes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ def download_release_notes
log.info("Skipping release notes download due to previous download issues")
break
end
if InstData.downloaded_release_notes.include? product["name"]
log.info("Release notes for #{product["name"]} already downloaded, skipping...")
if InstData.downloaded_release_notes.include? product["short_name"]
log.info("Release notes for #{product["short_name"]} already downloaded, skipping...")
next
end
url = product["relnotes_url"]
log.debug("URL: #{url}")
# protect from wrong urls
if url.nil? || url.empty?
log.warn("Skipping invalid URL #{url.inspect} for product #{product["name"]}")
log.warn("Skipping invalid URL #{url.inspect} for product #{product["short_name"]}")
next
end
pos = url.rindex("/")
Expand Down Expand Up @@ -108,8 +108,8 @@ def download_release_notes
log.info("Downloading release notes: #{cmd} returned #{ret}")
if ret == 0
log.info("Release notes downloaded successfully")
InstData.release_notes[product["name"]] = SCR.Read(path(".target.string"), filename)
InstData.downloaded_release_notes << product["name"]
InstData.release_notes[product["short_name"]] = SCR.Read(path(".target.string"), filename)
InstData.downloaded_release_notes << product["short_name"]
break
# exit codes (see "man curl"):
# 7 = Failed to connect to host.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installation/clients/inst_system_analysis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def download_and_show_release_notes
# push button
Wizard.ShowReleaseNotesButton(_("Re&lease Notes..."), "rel_notes")

product_name = Product.name || _("Unknown Product")
product_name = Product.short_name || _("Unknown Product")
InstData.release_notes[product_name] = @media_text
UI::SetReleaseNotes(product_name => @media_text)
end
Expand Down

0 comments on commit 17532ae

Please sign in to comment.