Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503598 - emerge should write numerical separators according to LC_NUMERIC
Summary: emerge should write numerical separators according to LC_NUMERIC
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
Depends on:
Blocks: 484436
  Show dependency tree
Reported: 2014-03-06 10:38 UTC by Toni Ballesta
Modified: 2017-12-30 21:40 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Toni Ballesta 2014-03-06 10:38:09 UTC
The qsize output is rare for the European and South America countries. For example, if I need the size of lsof, the output is:

$ qsize lsof
sys-process/lsof-4.85-r2: 30 files, 9 non-files, 434.593 KB

In half world, it seems to be 424MB. It doesn't use the LC_NUMERIC variable for print the commas or dots. Plus, I vote for the use of 2 decimals instead of 3. The correct output and that's recommended is, for the half world:

sys-process/lsof-4.85-r2: 30 files, 9 non-files, 434,59 KB

Other bigger packages not seems this problem, like qtcore. Here no cause read problems, because more than 3 entire numbers:

dev-qt/qtcore-4.8.5-r1: 1554 files, 210 non-files, 30342.245 KB

And if qsize applying BLOCK_SIZE and LC_NUMERIC variables correctly, this output can be transform to this:

dev-qt/qtcore-4.8.5-r1: 1554 files, 210 non-files, 30.342,245 KB

or LC_NUMERIC="en_GB", for example:

dev-qt/qtcore-4.8.5-r1: 1554 files, 210 non-files, 30,342.245 KB

or in bytes with LC_NUMERIC="es_ES.UTF-8":

dev-qt/qtcore-4.8.5-r1: 1554 files, 210 non-files, 31.070.459 bytes


Now, the output for pretend to emerge the qtdbus:

$ emerge -vp qtdbus

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-qt/qtdbus-4.8.5:4  USE="exceptions (-aqua) -debug -pch" 235,832 kB

Total: 1 package (1 reinstall), Size of downloads: 235,832 kB

236 KB? Yes, I know that this is MB, but the comma here is wrong for me.

I think that if app-portage/portage-utils and sys-apps/portage read these variables, these numbers can be read to the same format that gnu file utilities, for standarize, and the -k and -b options can be deleted (or not).
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-06 17:19:23 UTC
emerge is from sys-apps/portage
qsize is from app-portage/portage-utils

Please file separate bug reports for separate packages. This one is now restricted to sys-apps/portage.
Comment 2 Sebastian Luther (few) 2014-03-06 17:36:42 UTC
I'd say numeric formatting is part of localization. So either english text + english numeric formatting or localized text + localized numeric formatting. Localizing numeric formatting only seems wrong to me.
Comment 3 Toni Ballesta 2014-03-06 18:26:00 UTC
Ok, I have created the bug/enhancement, the bug #503646, for only the app-portage/portage-utils.

Discarded here the qsize and app-portage/portage-utils.

Comment 4 Toni Ballesta 2014-03-06 18:47:00 UTC
Hello Sebastian. I don't know how is developed the application and how store the information, but if all the sizes are writed in entire numbers (bytes), like a filesystem, I think that's no problem for print in localized format.
Comment 5 Alexander Berntsen (RETIRED) gentoo-dev 2014-03-07 09:50:21 UTC
I would prefer to not have localisation of this at all. It makes it annoying to help users. And the benefit for the users vs. the work for the developers does not seem to be cost-effective.

Of course, if users feel *very* strongly about this, I might be persuaded otherwise...
Comment 6 Toni Ballesta 2017-12-30 16:15:01 UTC
I can see today (more than 3 years later...) that Michał Górny write the commit 5f519fc3a9912e993f7cc0e55792deb2bc262559 on the 29 of same month of bug creation referent to solve the localization. Thanks!

This bug is not mentioned and isn't marked as resolved/fixed, because probably is not the same thing (I doubt it).

The most important of the bug seems solved.