You are not logged in.

#1 2012-01-18 09:35:49

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

pacman unit format

hi to everybody,

with latest update (pacman-4.0.1-4), units' format change from MB -> to -> MiB

how can i revert it back ???

thanks


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#2 2012-01-18 09:41:55

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: pacman unit format

Editing the source code and compiling it yourself.

Offline

#3 2012-01-18 19:42:57

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: pacman unit format

really ? don't exist a switch ?


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#4 2012-01-18 21:01:34

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: pacman unit format

If you'd rather have the inaccurate units of measurement, then yes, you'll need to revert it yourself in the code.

Offline

#5 2012-01-18 21:30:21

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: pacman unit format

whats wrong with MiB?

Offline

#6 2012-01-19 08:24:19

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: pacman unit format

I think you should read on the difference between the two.

https://en.wikipedia.org/wiki/Mebibyte

And as others pointed out, MiB is the correct usage.

Offline

#7 2012-01-19 10:58:31

robcat
Member
From: Fermo
Registered: 2009-02-21
Posts: 19

Re: pacman unit format

x33a wrote:

And as others pointed out, MiB is the correct usage.

Why is that? To me the MB (10^9 B 10^6 B) is a perfectly fine unit of measurement.

Though I like more the base-2 multiples (easier for the cpu to do the conversion), you have to consider that hard disk capacity is always advertised in decimal units. Maybe a switch like in ls (--si) could be implemented.

Last edited by robcat (2012-01-19 11:18:08)

Offline

#8 2012-01-19 11:05:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman unit format

robcat wrote:

you have to consider that hard disk capacity is always advertised in decimal unit

So instead of 1000000 MB you get 953674 (or whatever) MiB.

robcat wrote:

To me the MB (10^9 B) is a perfectly fine unit of measurement.

10 ^ 6

Last edited by karol (2012-01-19 11:06:43)

Offline

#9 2012-01-19 11:35:55

robcat
Member
From: Fermo
Registered: 2009-02-21
Posts: 19

Re: pacman unit format

karol wrote:

So instead of 1000000 MB you get 953674 (or whatever) MiB.

Yes, but you have to convert back to MB if you want to compare it to your hard drive/DVD/flash memory capacity or check how much you provider will bill you for network usage. I still don't understand why MB is better than MiB in this context.

Ubuntu, for example, is standardizing on decimal multiples for disk sizes and network usage https://wiki.ubuntu.com/UnitsPolicy and other tools on my system (like gnome disk utility) are displaying disk sizes in GB

Offline

#10 2012-01-19 11:39:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman unit format

Are you measuring your HD space with pacman? df can use either MB or MiB.

Ask Ubuntu to reverse their way.

Offline

#11 2012-01-19 11:39:48

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: pacman unit format

None of this is happening, period. We switched from MB -> MiB to be clear we divide by 1024 for our units (we always have!), so it looks like you are barking up the wrong tree anyway here, as we're just making it reflect reality, not changing the divisor. Adding some crappy flag is about the least KISS thing we could do here.

Offline

#12 2012-01-19 12:12:11

robcat
Member
From: Fermo
Registered: 2009-02-21
Posts: 19

Re: pacman unit format

karol wrote:

Are you measuring your HD space with pacman? df can use either MB or MiB.
Ask Ubuntu to reverse their way.

The open poster was asking why the units were changed, and other posters said the old ones were incorrect/inaccurate; so I was bringing some examples to understand why are those wrong usages. From what I see in man units, even linux is reporting the disk space in MB.

I've always assumed pacman 3 was using the units consistently, was it using MB for 2^20 B instead?

Offline

#13 2012-01-19 12:14:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman unit format

In  the  free software world programs are slowly being changed to con‐
       form.  When the Linux kernel boots and says

              hda: 120064896 sectors (61473 MB) w/2048KiB Cache

       the MB are megabytes and the KiB are kibibytes.

Not sure why it's MB + KiB.


ON my system it says

ata1.00: 78156288 sectors, multi 16: LBA

Last edited by karol (2012-01-19 12:21:59)

Offline

Board footer

Powered by FluxBB