| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Merge branch 'history-comment' into 'main' | Julian Andres Klode | 2024-11-18 | 1 | -0/+2 |
| |\ | | | | | | | | | Add a --comment option to record Comment: in history See merge request apt-team/apt!401 | ||||
| | * | Add a --comment option to record Comment: in history | Julian Andres Klode | 2024-11-18 | 1 | -0/+2 |
| | | | | | | | | | Suggested-by: mhoye on IRC | ||||
| * | | patterns: Safely peek ahead one byte | Julian Andres Klode | 2024-11-18 | 1 | -1/+17 |
| |/ | | | | | | | | | | | | | | | 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> | ||||
| * | Handle Retry-After by default | Julian Andres Klode | 2024-11-18 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | 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 | Felix Moessbauer | 2024-11-18 | 3 | -5/+29 |
| | | | | | | | | | | | | | | | | | | | | 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> | ||||
| * | string_view: Include missing headers | Julian Andres Klode | 2024-11-17 | 1 | -0/+3 |
| | | | | | | | | | | 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. | ||||
| * | Merge branch 'reefer' into 'main' | Julian Andres Klode | 2024-11-14 | 6 | -59/+49 |
| |\ | | | | | | | | | DEFER See merge request apt-team/apt!392 | ||||
| | * | fdopen() failing does not close the fd | наб | 2024-11-14 | 1 | -0/+2 |
| | | | |||||
| | * | DEFER() more | наб | 2024-11-14 | 6 | -58/+44 |
| | | | |||||
| | * | DEFER | наб | 2024-11-14 | 1 | -4/+6 |
| | | | |||||
| * | | Merge branch 'noref' into 'main' | Julian Andres Klode | 2024-11-14 | 2 | -13/+13 |
| |\ \ | | | | | | | | | | | | | std::string_view const & -> std::string_view See merge request apt-team/apt!397 | ||||
| | * | | std::string_view const & -> std::string_view | наб | 2024-11-14 | 2 | -13/+13 |
| | |/ | | | | | | | Fixes: 2c03eed649068c8838d971ceeb1a09603dcc8e9c | ||||
| * | | Merge branch 'append' into 'main' | Julian Andres Klode | 2024-11-14 | 3 | -6/+8 |
| |\ \ | | | | | | | | | | | | | (+=)+= -> append().append() See merge request apt-team/apt!398 | ||||
| | * | | (+=)+= -> append().append() | наб | 2024-11-14 | 3 | -6/+8 |
| | |/ | |||||
| * | | if APT_PKG_ABI > 600: using APT::StringView = std::string_view; | наб | 2024-11-14 | 1 | -0/+6 |
| | | | |||||
| * | | pkgTagSection::Tag constructors: std::string const& -> std::string_view ↵ | наб | 2024-11-14 | 2 | -14/+32 |
| | | | | | | | | | (always copied) [#if APT_PKG_ABI > 600] | ||||
| * | | apt-pkg/contrib/hashes.cc, apt-pkg/contrib/hashes.h: APT::StringView -> ↵ | наб | 2024-11-14 | 2 | -9/+16 |
| | | | | | | | | | 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] | ||||
| * | | Move StringViewCompareFast to strutil.h | наб | 2024-11-14 | 2 | -18/+19 |
| | | | |||||
| * | | apt-pkg/tagfile.h: prepare for APT::StringView -> std::string_view | наб | 2024-11-14 | 1 | -2/+2 |
| |/ | |||||
| * | apt-pkg/contrib/gpgv.cc: APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -7/+7 |
| | | |||||
| * | apt-pkg/deb/deblistparser.h: APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -6/+5 |
| | | |||||
| * | apt-pkg/deb/deblistparser.cc: APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -30/+31 |
| | | |||||
| * | apt-pkg/deb/debsrcrecords.h: APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -7/+7 |
| | | |||||
| * | apt-pkg/deb/debsrcrecords.cc: APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -12/+12 |
| | | |||||
| * | apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h: APT::StringView -> ↵ | наб | 2024-11-12 | 4 | -123/+123 |
| | | | | | std::string_view | ||||
| * | apt-pkg/cachefilter-patterns.h, apt-pkg/cachefilter-patterns.cc: prepare for ↵ | наб | 2024-11-12 | 2 | -65/+66 |
| | | | | | APT::StringView -> std::string_view | ||||
| * | apt-pkg/acquire-item.cc: prepare for APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -7/+7 |
| | | |||||
| * | apt-pkg/deb/debrecords.cc: prepare for APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -20/+20 |
| | | |||||
| * | apt-pkg/deb/debmetaindex.cc: prepare for APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -7/+7 |
| | | |||||
| * | apt-pkg/tagfile.cc: prepare for APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -1/+1 |
| | | |||||
| * | apt-pkg/policy.cc: prepare for APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -4/+3 |
| | | |||||
| * | apt-pkg/contrib/configuration.cc: prepare for APT::StringView -> ↵ | наб | 2024-11-12 | 1 | -40/+39 |
| | | | | | std::string_view | ||||
| * | apt-pkg/indexcopy.cc: prepare for APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -38/+38 |
| | | |||||
| * | flCombine: try to reuse one of the strings when returning | наб | 2024-11-12 | 1 | -54/+54 |
| | | |||||
| * | apt-pkg/edsp/edsplistparser.cc: APT::StringView -> std::string_view | наб | 2024-11-12 | 6 | -13/+9 |
| | | |||||
| * | apt-pkg/algorithms.cc, apt-pkg/cachefilter.h: drop unused #include ↵ | наб | 2024-11-12 | 2 | -2/+0 |
| | | | | | <apt-pkg/string_view.h> | ||||
| * | apt-pkg/edsp.cc: APT::StringView -> std::string_view | наб | 2024-11-12 | 1 | -9/+8 |
| | | |||||
| * | APT::StringView: add operator std::string_view(), StringViewCompareFast() ↵ | наб | 2024-11-12 | 1 | -4/+13 |
| | | | | | for std::string_views, operator<<(ostream&), std::string_view constructor, operator==(std::string_view) | ||||
| * | ReportMirrorFailureToCentral: fix use-after-free | наб | 2024-11-12 | 1 | -1/+2 |
| | | |||||
| * | Merge branch 'more' into 'main' | Julian Andres Klode | 2024-11-12 | 9 | -105/+114 |
| |\ | | | | | | | | | APT_BUFFER_SIZE pkgTagFile default size. std::vector(1024) -> std::array<1024>. dpkgpm buffers See merge request apt-team/apt!390 | ||||
| | * | dpkgpm: fdopen() failing doesn't close the fd | наб | 2024-11-12 | 1 | -0/+3 |
| | | | |||||
| | * | dpkgpm: append ":$printarchitecture" instead of ':'+${#printarchitecture} to ↵ | наб | 2024-11-12 | 1 | -1/+1 |
| | | | | | | | | | package name | ||||
| | * | dpkgpm: use getline() for Apport var/crash lines | наб | 2024-11-12 | 1 | -18/+11 |
| | | | | | | | | | | | Also remove useless condition: sscanf() already direct-matches non-whitespace bytes | ||||
| | * | dpkgpm: use std::array<unsigned char, APT_BUFFER_SIZE> for I/O copy buffers | наб | 2024-11-12 | 1 | -7/+7 |
| | | | |||||
| | * | dpkgpm: use sysconf(_SC_GETPW_R_SIZE_MAX)-sized + growing buffer for ↵ | наб | 2024-11-12 | 1 | -2/+7 |
| | | | | | | | | | getpwuid_r() instead of 255 | ||||
| | * | pkgDPkgPMPrivate::dpkgbuf: char[1024] -> array<char, APT_BUFFER_SIZE> | наб | 2024-11-12 | 1 | -8/+8 |
| | | | |||||
| | * | dpkgpm: lift out CopyIndented() and make_unique_*() for FILEs; use getline() ↵ | наб | 2024-11-12 | 3 | -60/+55 |
| | | | | | | | | | for reading lines instead of 1k buffer | ||||
| | * | Turn unique_ptr<decltype(fclose and free)> into real deleter types (warnings ↵ | наб | 2024-11-12 | 5 | -13/+25 |
| | | | | | | | | | now, UB in C++20) | ||||
| | * | Bump pkgTagFile default Size from 32k to APT_BUFFER_SIZE | наб | 2024-11-11 | 1 | -4/+4 |
| | | | |||||
| | * | Replace constant-size never-reallicated getservbyport_r() std::vector buffer ↵ | наб | 2024-11-11 | 1 | -1/+2 |
| | | | | | | | | | with std::array | ||||
