Skip to content

Commit

Permalink
release download: break downloading if the host/proxy cannot be resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Feb 1, 2017
1 parent 5bf0acb commit 147b58b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
7 changes: 7 additions & 0 deletions package/yast2-installation.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Feb 1 17:07:23 CET 2017 - schubi@suse.de

- Downloading release notes: Do not try again if the host or the
proxy cannot be resolved (bnc#1022784)
- 3.1.220

-------------------------------------------------------------------
Thu Jan 5 13:16:08 CET 2017 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 3.1.219
Version: 3.1.220
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
14 changes: 9 additions & 5 deletions src/lib/installation/clients/inst_download_release_notes.rb
Expand Up @@ -106,16 +106,20 @@ def download_release_notes
)
ret = SCR.Execute(path(".target.bash"), cmd)
log.info("Downloading release notes: #{cmd} returned #{ret}")
# exit codes (see "man curl"):
skip_ret = {
5 => "Couldn't resolve proxy.",
6 => "Couldn't resolve host.",
7 => "Failed to connect to host.",
28 => "Operation timeout."
}
if ret == 0
log.info("Release notes downloaded successfully")
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.
# 28 = Operation timeout.
elsif ret == 7 || ret == 28
log.info "Communication with server for release notes download failed, skipping further attempts."
elsif skip_ret.has_key? ret
log.info "Communication with server for release notes download failed ( #{skip_ret[ret]} ), skipping further attempts."
InstData.stop_relnotes_download = true
break
end
Expand Down

0 comments on commit 147b58b

Please sign in to comment.