wget -q will turn off wget's output, even error. curl -sS can disable progress meter but still show error messages. So use curl -sS instead of wget -q.
Signed-off-by: Lin Jiaxin ljx.joe@qq.com --- providers/docker/docker.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/providers/docker/docker.rb b/providers/docker/docker.rb index 56c9754..f4e954e 100755 --- a/providers/docker/docker.rb +++ b/providers/docker/docker.rb @@ -49,8 +49,9 @@ def parse_response(url) return hash end
-def wget_cmd(path, url, name) - system "wget -q -P #{path} #{url} && gzip -dc #{path}/#{name} | cpio -id -D #{path}" + +def curl_cmd(path, url, name) + system "curl -sS --create-dirs -o #{path}/#{name} #{url} && gzip -dc #{path}/#{name} | cpio -id -D #{path}" end
def build_load_path(hostname) @@ -75,8 +76,8 @@ def load_initrds(load_path, hash) arch = RUBY_PLATFORM.split('-')[0] job_url = hash['job'] lkp_url = hash['lkp'] - wget_cmd(load_path, job_url, 'job.cgz') - wget_cmd(load_path, lkp_url, "lkp-#{arch}.cgz") + curl_cmd(load_path, job_url, 'job.cgz') + curl_cmd(load_path, lkp_url, "lkp-#{arch}.cgz") end
def start_container(hostname, load_path, hash)
On Mon, Feb 08, 2021 at 06:38:25PM +0800, Lin Jiaxin wrote:
Reviewed-by: Wang Yong wangyong0117@qq.com
wget -q will turn off wget's output, even error. curl -sS can disable progress meter but still show error messages. So use curl -sS instead of wget -q.
Signed-off-by: Lin Jiaxin ljx.joe@qq.com
providers/docker/docker.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/providers/docker/docker.rb b/providers/docker/docker.rb index 56c9754..f4e954e 100755 --- a/providers/docker/docker.rb +++ b/providers/docker/docker.rb @@ -49,8 +49,9 @@ def parse_response(url) return hash end
-def wget_cmd(path, url, name)
- system "wget -q -P #{path} #{url} && gzip -dc #{path}/#{name} | cpio -id -D #{path}"
+def curl_cmd(path, url, name)
- system "curl -sS --create-dirs -o #{path}/#{name} #{url} && gzip -dc #{path}/#{name} | cpio -id -D #{path}"
end
def build_load_path(hostname) @@ -75,8 +76,8 @@ def load_initrds(load_path, hash) arch = RUBY_PLATFORM.split('-')[0] job_url = hash['job'] lkp_url = hash['lkp']
- wget_cmd(load_path, job_url, 'job.cgz')
- wget_cmd(load_path, lkp_url, "lkp-#{arch}.cgz")
- curl_cmd(load_path, job_url, 'job.cgz')
- curl_cmd(load_path, lkp_url, "lkp-#{arch}.cgz")
end
def start_container(hostname, load_path, hash)
2.23.0