Skip to content

Commit

Permalink
Sle 12 sp2 casp bnc 1022784 (#527)
Browse files Browse the repository at this point in the history
* release download: break downloading if the host/proxy cannot be resolved
  • Loading branch information
schubi2 committed Feb 20, 2017
1 parent 0209382 commit d5e02ac
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -10,7 +10,7 @@ before_install:
- sudo apt-get install libaugeas-dev libxml2-dev
# end of augeas install
- wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2-core-dev yast2 yast2-network yast2-transfer yast2-users yast2-country libaugeas-dev" -g "rspec:3.3.0 yast-rake gettext rubocop:0.41.2 simplecov:0.12.0 coveralls:0.8.19 cheetah abstract_method cfa"
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2-core-dev yast2 yast2-network yast2-transfer yast2-users yast2-country libaugeas-dev" -g "rspec:3.3.0 yast-rake gettext rubocop:0.41.2 coveralls:0.8.19 cheetah abstract_method cfa"
script:
- rake check:syntax
- rake check:pot
Expand Down
7 changes: 7 additions & 0 deletions package/yast2-installation.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
Mon Feb 20 13:28:28 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.217.25

-------------------------------------------------------------------
Tue Feb 14 13:24:33 CET 2017 - schubi@suse.de

- CaaSP AY: Adapted requirements of yast2-services-manager.
Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 3.1.217.24
Version: 3.1.217.25
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
13 changes: 8 additions & 5 deletions src/lib/installation/clients/inst_download_release_notes.rb
Expand Up @@ -31,9 +31,12 @@ class InstDownloadReleaseNotesClient < Client

# When cURL returns one of those codes, the download won't be retried
# @see man curl
# 7 = Failed to connect to host.
# 28 = Operation timeout.
CURL_GIVE_UP_RETURN_CODES = [7, 28].freeze
CURL_GIVE_UP_RETURN_CODES = {
5 => "Couldn't resolve proxy.",
6 => "Couldn't resolve host.",
7 => "Failed to connect to host.",
28 => "Operation timeout."
}.freeze

# Download all release notes mentioned in Product::relnotesurl_all
#
Expand Down Expand Up @@ -123,8 +126,8 @@ def download_release_notes
InstData.release_notes[product["short_name"]] = SCR.Read(path(".target.string"), filename)
InstData.downloaded_release_notes << product["short_name"]
break
elsif CURL_GIVE_UP_RETURN_CODES.include?(ret)
log.info "Communication with server for release notes download failed, skipping further attempts."
elsif CURL_GIVE_UP_RETURN_CODES.key? ret
log.info "Communication with server for release notes download failed ( #{CURL_GIVE_UP_RETURN_CODES[ret]} ), skipping further attempts."
InstData.stop_relnotes_download = true
break
else
Expand Down

0 comments on commit d5e02ac

Please sign in to comment.