dnf
dnf copied to clipboard
Failed Delta RPMs increased size message: percentage calculation
Upon an operation with failed delta RPMs I'm presented with the message
Failed Delta RPMs increased 148.9 MB of updates to 189.0 MB (21.2% wasted)
.
Scope of this ticket is the percentage calculation ("21.2% wasted").
The difference between 148.9 MB (full) and 189.0 MB (real) is 40.1 MB. And 40.1 MB is 21.2% of 189.0 MB. But to calculate the size "wasted" (I interpret this to mean needlessly downloaded in addition), shouldn't the percentage calculation be based on the expected full size instead of on the real size?
I'd expect the message to say
Failed Delta RPMs increased 148.9 MB of updates to 189.0 MB (26.9% wasted)
.
as in 40.1 MB is 26.9% of the original 148.9 MB, and by an increase to 189.0 MB the size was increased by 26.9% of 148.9 MB.
Thanks for a sanity check!
Environment: dnf 4.14.0, dnf-0:4.14.0-1.fc37.noarch