Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 590932 - app-portage/portage-utils: make_human_readable_str uses non-standard %Lu
Summary: app-portage/portage-utils: make_human_readable_str uses non-standard %Lu
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-10 12:15 UTC by S. Gilles
Modified: 2016-11-12 17:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch which fixes the issue for me (portage-utils-0.6.3-use-ll-instead-of-L.patch,849 bytes, patch)
2016-08-10 12:16 UTC, S. Gilles
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description S. Gilles 2016-08-10 12:15:19 UTC
In libq/human_readable.c, the format strings use %'Lu as a format specifier, but L is not a valid length specifier for u.  Since sys-libs/glibc has implemented L and ll as synonyms, this works for most systems, but sys-libs/musl has been more literal, and causes the result to be an empty string.

Reproducible: Always

Steps to Reproduce:
1. On a musl-based system (or with portage-utils built against musl), run `qsize -k portage-utils'
Actual Results:  
app-portage/portage-utils-0.63: 36 files, 10 non-files,  KiB

Expected Results:  
app-portage/portage-utils-0.63: 36 files, 10 non-files, 184 KiB

Since val is an unsigned long long, using %'llu seems to work fine.  The attached patch has been tested on x86_64-pc-linux-gnu and armv7a-hardfloat-linux-musleabi.
Comment 1 S. Gilles 2016-08-10 12:16:40 UTC
Created attachment 442912 [details, diff]
Patch which fixes the issue for me
Comment 2 SpanKY gentoo-dev 2016-08-11 04:17:08 UTC
just need to re-sync with the busybox sources as they've fixed this long ago