diff --git a/repos/libports/src/app/fetchurl/README b/repos/libports/src/app/fetchurl/README index 0a3fa0dc27..9b79cc173d 100644 --- a/repos/libports/src/app/fetchurl/README +++ b/repos/libports/src/app/fetchurl/README @@ -13,6 +13,8 @@ success (via exit-code 0). It is useful when batching is used where a failed fetch operation should not influence the over-all result. The default value is 'false'. +The 'verbose' attribute instruct the component to increase its verbosity +and show diagnostic messages during its operation. The following config snippets illustrate its usage. diff --git a/repos/libports/src/app/fetchurl/component.cc b/repos/libports/src/app/fetchurl/component.cc index b5b67a66fd..478d2362cf 100644 --- a/repos/libports/src/app/fetchurl/component.cc +++ b/repos/libports/src/app/fetchurl/component.cc @@ -117,6 +117,8 @@ struct Fetchurl::Main bool _ignore_result { false }; + bool _verbose { false }; + void _schedule_report() { using namespace Genode; @@ -194,6 +196,8 @@ struct Fetchurl::Main _ignore_result = config_node.attribute_value("ignore_failures", _ignore_result); + + _verbose = config_node.attribute_value("verbose", false); } Main(Libc::Env &e) : _env(e) @@ -213,6 +217,7 @@ struct Fetchurl::Main for (size_t sub_path_len = 0; ; sub_path_len++) { bool const end_of_path = (out_path[sub_path_len] == 0); + bool const end_of_elem = (out_path[sub_path_len] == '/'); if (end_of_path) @@ -262,7 +267,8 @@ struct Fetchurl::Main } _fetch.fd = fd; - curl_easy_setopt(_curl, CURLOPT_VERBOSE, 1L); + if (_verbose) + curl_easy_setopt(_curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(_curl, CURLOPT_URL, _fetch.url.string()); curl_easy_setopt(_curl, CURLOPT_FOLLOWLOCATION, true);