mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 15:41:04 +02:00
Prebuilts should not gate normal builds if the server responds with an error.
Recently the tegra2 prebuilts were uploaded with an internal only address and caused external builds to fail. If a user cannot get the Packages file their build should continue as normal as if the server responded without a packages file in general. BUG=chromium-os:9917 TEST=Set PORTAGE_BINHOST to invalid value and run build. Change-Id: I95cab67da7a539afe8c48c831788eca29cc5dc69 Review URL: http://codereview.chromium.org/6085001
This commit is contained in:
parent
8ce81f32dc
commit
3f898563fb
@ -748,15 +748,13 @@ class DepGraphGenerator(object):
|
|||||||
try:
|
try:
|
||||||
return urllib2.urlopen(url)
|
return urllib2.urlopen(url)
|
||||||
except urllib2.HTTPError as e:
|
except urllib2.HTTPError as e:
|
||||||
|
print "Cannot GET %s: %s" % (url, str(e))
|
||||||
if i + 1 >= tries or e.code < 500:
|
if i + 1 >= tries or e.code < 500:
|
||||||
raise
|
raise
|
||||||
else:
|
|
||||||
print "Cannot GET %s: %s" % (url, str(e))
|
|
||||||
except urllib2.URLError as e:
|
except urllib2.URLError as e:
|
||||||
|
print "Cannot GET %s: %s" % (url, str(e))
|
||||||
if i + 1 >= tries:
|
if i + 1 >= tries:
|
||||||
raise
|
raise
|
||||||
else:
|
|
||||||
print "Cannot GET %s: %s" % (url, str(e))
|
|
||||||
print "Sleeping for 10 seconds before retrying..."
|
print "Sleeping for 10 seconds before retrying..."
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
|
||||||
@ -1835,7 +1833,11 @@ def main():
|
|||||||
remote_pkgs = {}
|
remote_pkgs = {}
|
||||||
if "--getbinpkg" in emerge.opts:
|
if "--getbinpkg" in emerge.opts:
|
||||||
binhost = emerge.settings["PORTAGE_BINHOST"]
|
binhost = emerge.settings["PORTAGE_BINHOST"]
|
||||||
remote_pkgs = deps.RemotePackageDatabase(binhost)
|
try:
|
||||||
|
remote_pkgs = deps.RemotePackageDatabase(binhost)
|
||||||
|
except (urllib2.HTTPError, urllib2.URLError):
|
||||||
|
print "Cannot resolve binhost. Building from source..."
|
||||||
|
del emerge.opts["--getbinpkg"]
|
||||||
|
|
||||||
deps_tree, deps_info = deps.GenDependencyTree(remote_pkgs)
|
deps_tree, deps_info = deps.GenDependencyTree(remote_pkgs)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user