diff options
| author | Anders Kaseorg <andersk@mit.edu> | 2026-03-26 23:45:07 -0700 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-04-07 09:34:15 +0000 |
| commit | df55da00262a7a6b7f885e3fc66559767761cae5 (patch) | |
| tree | 4065ff1f0a7a4848822803e903565dec111bf732 /debian/libapt-pkg-doc.install | |
| parent | 6cc5779d18baf520278952aed504b9d9b168a4bd (diff) | |
Fix Phased-Update-Percentage probability mistake
Previously a package with Phased-Update-Percentage: n would be updated
with probability (n + 1)/101 instead of n/100. For example, a package
with Phased-Update-Percentage: 0 could still be updated even though it
shouldn’t, and a package with Phased-Update-Percentage: 1 would be
installed almost twice as much as it should be. Correct the erroneous
math.
Note that libstdc++ implements std::uniform_int_distribution in such a
way that for a given seed, changing dist(0, 100) to dist(0, 99) has
the effect of decreasing each sample by 0 or 1; therefore, this patch
will not randomly trigger extra phased updates that had previously
been excluded.
Fixes: c5bc86d45e003905ef411146e66b414d26fb1ff8
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'debian/libapt-pkg-doc.install')
0 files changed, 0 insertions, 0 deletions
