aboutsummaryrefslogtreecommitdiff
path: root/bpkg/system-package-manager.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-02-10 14:04:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-02-10 14:04:27 +0300
commit4887f43d983898e48feaffc467327bc7fc4e1180 (patch)
tree755e24995452ae20fbddf657e582819de8b27e25 /bpkg/system-package-manager.hxx
parente1c36d138fb38cfe46cb236b87f092810075ef20 (diff)
Add support for fetch timeout to system package managers
Diffstat (limited to 'bpkg/system-package-manager.hxx')
-rw-r--r--bpkg/system-package-manager.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/bpkg/system-package-manager.hxx b/bpkg/system-package-manager.hxx
index 63bf676..941c981 100644
--- a/bpkg/system-package-manager.hxx
+++ b/bpkg/system-package-manager.hxx
@@ -188,10 +188,14 @@ namespace bpkg
// available version of the not yet installed or partially installed
// packages.
//
+ // If fetch timeout (in seconds) is specified, then use it for all the
+ // underlying network operations.
+ //
system_package_manager (bpkg::os_release&& osr,
const target_triplet& h,
string a,
optional<bool> progress,
+ optional<size_t> fetch_timeout,
bool install,
bool fetch,
bool yes,
@@ -200,6 +204,7 @@ namespace bpkg
host (h),
arch (move (a)),
progress_ (progress),
+ fetch_timeout_ (fetch_timeout),
install_ (install),
fetch_ (fetch),
yes_ (yes),
@@ -283,7 +288,8 @@ namespace bpkg
const string& version_id,
const vector<string>& like_ids);
protected:
- optional<bool> progress_; // --[no]-progress (see also stderr_term)
+ optional<bool> progress_; // --[no]-progress (see also stderr_term)
+ optional<size_t> fetch_timeout_; // --fetch-timeout
// The --sys-* option values.
//