Bug 2412337 - Sorting of directory sizes in zz-disk-space module not correct
Summary: Sorting of directory sizes in zz-disk-space module not correct
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: logwatch
Version: 43
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Frank Crawford
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-11-04 20:23 UTC by Charles Dennett
Modified: 2026-02-03 03:27 UTC (History)
2 users (show)

Fixed In Version: logwatch-7.14-1.fc43 logwatch-7.14-1.fc42
Clone Of:
Environment:
Last Closed: 2026-01-31 17:31:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Charles Dennett 2025-11-04 20:23:39 UTC
I've noticed that a recent update to logwatch finally has the zz-disk-space module reporting disk usage.  However, the sorting is not correct.  Here is a snippet from what I see when running logwatch:

 4.0K   /var/log/cups
 4.0K   /var/log/chrony
 4.0K   /var/log/btmp-20251101
 4.0K   /var/log/blivet-gui
 2.5M   /var/log/tuned
 2.0G   /var/log/journal
 1.5M   /var/log/maillog-20251102
 1.3M   /var/log/maillog-20251026

What is happening is that it is sorted on the just the numeric value of the space a file or directory occupies and ignores the multiplier letter (K,M,G).  It makes it difficult to find a space hog since the "G" values are all mixed in with the M and K values.

Reproducible: Always

Steps to Reproduce:
1.Run logwatch 
2.Observe results of directory sizes
3.
Actual Results:
Output not sorted correctly

Expected Results:
Output should be sorted correctly with all the "G" values followed by the M values followed by the K values in correct numerical order.

Additional Information:
Current version of logwatch is 7.13.3

Comment 1 Frank Crawford 2025-11-11 00:27:06 UTC
This looks to be an easy fix, although I need to check how long the sort human_numeric_sort option has existed, to make sure I don't break backward compatibility.

It should appear in the next major update to logwatch (in a few months), unless you believe it is urgent to fix for Fedora before that.

Comment 2 Charles Dennett 2025-11-11 01:25:56 UTC
It's not urgent.  Thanks for looking onto it.

Comment 3 Frank Crawford 2025-12-24 01:28:57 UTC
Note, upstream has been updated, and the next release is due around end of Jan 2026.  I'll update the Fedora RPM shortly after the upstream release.

Comment 4 Fedora Update System 2026-01-25 09:35:31 UTC
FEDORA-2026-8feedeeea9 (logwatch-7.14-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-8feedeeea9

Comment 5 Fedora Update System 2026-01-25 09:43:46 UTC
FEDORA-2026-95771afe63 (logwatch-7.14-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-95771afe63

Comment 6 Fedora Update System 2026-01-26 01:27:23 UTC
FEDORA-2026-8feedeeea9 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-8feedeeea9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-8feedeeea9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2026-01-26 01:42:38 UTC
FEDORA-2026-95771afe63 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-95771afe63`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-95771afe63

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2026-01-31 17:31:06 UTC
FEDORA-2026-95771afe63 (logwatch-7.14-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2026-02-03 03:27:11 UTC
FEDORA-2026-8feedeeea9 (logwatch-7.14-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.