5dc847b47b4e0e970d6a1cf2da0abd7a4e1bad2e
Closes #932 `connect-timeout` gets replaced by an exponential backoff for the download timeout where the initial value is controlled by the setting `initial-connect-timeout`. Per iteration, the upper limit of the timeout is increased set to timeout := min(max_connect_timeout, initial_connect_timeout * 2^i) I decided to move the entire timeout / tracking of attempts into its own class to not make the filetransfer implementation more complex. Also, that allows us to write unit-tests for it. Setting `--download-attempts` to `0` is forbidden now and an exception will be thrown. For `--offline` we set it to `1`, the behavior is equivalent to what it was before: whether the max tries were exceeded is only checked after the first download exception got thrown, i.e. there's still one attempt being made. The end-result - with timeouts being caused by a wrongly set proxy - looks like this: $ env HTTPS_PROXY=1.1.1.1 nix store ping --store https://example.com warning: error: unable to download 'https://example.com/nix-cache-info': Connection timed out after 5006 milliseconds (curl error code=28); retrying in 422ms ms (attempt 1/5) warning: error: unable to download 'https://example.com/nix-cache-info': Connection timed out after 10010 milliseconds (curl error code=28); retrying in 1003ms ms (attempt 2/5) warning: error: unable to download 'https://example.com/nix-cache-info': Connection timed out after 20020 milliseconds (curl error code=28); retrying in 2018ms ms (attempt 3/5) warning: error: unable to download 'https://example.com/nix-cache-info': Connection timed out after 40007 milliseconds (curl error code=28); retrying in 4087ms ms (attempt 4/5) error: unable to download 'https://example.com/nix-cache-info': Connection timed out after 80074 milliseconds (curl error code=28) Change-Id: I9e8d08d78275bcf60080d663febc9e075243d36b
Lix
Lix is an implementation of Nix, a powerful package management system for Linux and other Unix systems that makes package management reliable and reproducible.
Read more about us at https://lix.systems.
Installation
On Linux and macOS the easiest way to install Lix is to run the following shell command (as a user other than root):
$ curl -sSf -L https://install.lix.systems/lix | sh -s -- install
For systems that already have a Nix implementation installed, such as NixOS systems, read our install page
Building And Developing
See our Hacking guide in our manual for instruction on how to set up a development environment and build Lix from source.
Additional Resources
- The Lix reference manual:
- Our wiki
- Matrix - #space:lix.systems
License
Lix is released under LGPL-2.1-or-later.
Description
Working fork of Lix - carries the adaptive load-aware build-remote patch. Upstream: gerrit.lix.systems
92 MiB
Languages
C++
74.9%
Python
11.7%
Nix
6.1%
Shell
3.6%
Meson
2%
Other
1.6%