| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
ftparchive: Remove fixed-size buffers
See merge request apt-team/apt!388
|
| | |
| |
| |
| | |
LP: #2087848
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of snprintf() into a fixed-size buffer, construct an
std::string using assign() and append().
A previous version used strprintf() which would have been
hilariously inefficient.
LP: #2087848
|
| | |
| |
| |
| | |
LP: #2087848
|
| |\ \
| | |
| | |
| | |
| | | |
Add a --comment option to record Comment: in history
See merge request apt-team/apt!401
|
| | |/
| |
| |
| | |
Suggested-by: mhoye on IRC
|
| |\ \
| |/
|/|
| |
| | |
patterns: Safely peek ahead one byte, and enable -Wp,-D_GLIBCXX_ASSERTIONS
See merge request apt-team/apt!400
|
| | |
| |
| |
| |
| |
| | |
This ensures some more hardening of all our container accesses,
preventing out of bounds. Especially now that we moved a lot of
C-style arrays to std::array.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pattern tree parser was written using string_views in a no-copy
fashion. However, at various places we assume that we can index one
byte after the end of the string_view and get a NUL-byte there.
This works fine in practice because we only ever pass it zero-terminated
string_views, but it fails if you compile with -Wp,-D_GLIBCXX_ASSERTIONS
because it will do bounds checks.
So instead, do our own bounds checks here and always return '\0'
if requesting one byte too many.
Reported-by: Christian Heusel <christian@heusel.eu>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's get some feedback here. This is capped to 30s per retry, so
a maximum of 90s per item that we delay the failure case. In the
worst case, we hence have 90n seconds delay for n items.
In a more realistic worse case however, the server likely does
not collapse per-item, and we end up trying all items in a short
burst so it seems more realistic we hit a 90s total delay.
The bursty behavior may be suboptimal; we don't quite know, but
it seems the specification of Retry-After is per-entity rather than
per-host, so technically speaking it seems correct.
|
| |\
| |
| |
| |
| | |
http: use Retry-After HTTP header to optimize retries
See merge request apt-team/apt!383
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When enabling Acquire::Retries::HandleRetryAfter, the value of the
Retry-After http header is honored and the retry is not executed earlier
than this point in time (except if that is longer than the max delay
time). The added test checks if the request is delayed at least by the
requested time.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some mirrors like snapshot.debian.org apply strict http rate limits.
While apt already has an exponential backoff mechanism implemented, this
is not sufficient due to the following reasons:
1. all retries happen roughly at the same time
2. the retry-after information from the server is not used
We fix this by improving the algorithm: First, if present, the timestamp
or duration of the Retry-After header is added to the exponential
backoff, optimizing for success-on-second-try. Second, a random delay is
added (delay += [0, delay]) to distribute the retries to not immediately
run into the limit again. To avoid super-long delays, this is capped by
the configured maximum delay. This logic only becomes active if the
option Acquire::Retries::HandleRetryAfter is enabled.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
|
| |
|
|
|
|
|
|
|
| |
Specifically the lack of the `string_view` include is causing
compilation failures for rust-rust-apt.
Running iwyu also adds `algorithm` for our use of `std::min`,
and `iosfwd` for our use of `std::ostream` none of which seem
to be causing build failures so far.
|
| |\
| |
| |
| |
| | |
DEFER
See merge request apt-team/apt!392
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
std::string_view const & -> std::string_view
See merge request apt-team/apt!397
|
| | | |
| | |
| | |
| | | |
Fixes: 2c03eed649068c8838d971ceeb1a09603dcc8e9c
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
(+=)+= -> append().append()
See merge request apt-team/apt!398
|
| | | |/
| |/| |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Prepare for APT::StringView -> std::string_view, #if APT_PKG_ABI > 600: ABI migrations and using APT::StringView = std::string_view;
See merge request apt-team/apt!396
|
| | | | |
|
| | | |
| | |
| | |
| | | |
(always copied) [#if APT_PKG_ABI > 600]
|
| | | |
| | |
| | |
| | | |
std::string_view in private interface. Take std::string_view instead of std::string const& for HashString::HashString (not reused) [#if APT_PKG_ABI > 600]
|
| | | | |
|
| | |/ |
|
| |\ \
| |/
|/|
| | |
apt Debian release 2.9.11
|
| | | |
|
| |\ \
| |/
|/|
| |
| | |
ftparchive/: prepare for APT::StringView -> std::string_view
See merge request apt-team/apt!395
|
| |/ |
|
| |\
| |
| |
| |
| | |
Internally replace APT::StringView with std::string_view where it doesn't affect the ABI, with implementations that support both std::string_view and APT::StringView with new shims. ReportMirrorFailureToCentral: fix use-after-free
See merge request apt-team/apt!394
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
std::string_view
|
| | | |
|
| | |
| |
| |
| | |
APT::StringView -> std::string_view
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|