Closed Bug 380158 Opened 17 years ago Closed 16 years ago

Installer calculates free space incorrectly, taking GB to mean MB

Categories

(SeaMonkey :: Installer, defect)

SeaMonkey 1.1 Branch
x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: chris, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1

I have 8 GB free on my root. It should suffice to install Seamonkey, given, it needs only 50 MB or so. However, I get the message from the installer that there are only 8000 KB free and the program needs 50000 KB or so. Obviously, the installer is off by a factor of 1000 in the calculation of free space.

This is what df shows:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1            152258899 143907834   8351065  95% /

The installer takes this to mean 8351 KB, instead of 8351 MB, that is 8,351 GB.

Reproducible: Always

Steps to Reproduce:
1. Get a drive with 160 GB and fill it so that df shows a use of 95%.
2. Run the installer and tell it to install Seamonkey on that drive, say on /opt/seamonkey.
3. The installer tells you that you have only 8300 KB free, while it should tell you that you have 8300 MB free. Thus, you cannot install, although you have more than enough space.



Why do these things happen to me? Why do I have to report such trivial errors? Did nobody before me try to install Seamonkey on a 160 GB drive that was 95% full? Am I the only one on this planet that tries such things? Just curious...
Try running this as root:
dumpe2fs /dev/sda1 | grep "Block size"

The available space computation will overflow if your block size is not divisible by 1024.  See

http://lxr.mozilla.org/seamonkey/source/xpinstall/wizard/unix/src2/nsSetupTypeDlg.cpp#1093
Does this still happen with the current release from http://www.seamonkey-project.org/ ?
Version: unspecified → SeaMonkey 1.1 Branch
I've tried the 1.1.7 installer. The bug does NOT happen with that version. There is no indication as to whether a "free space check" is done behind the scenes, but  whatever it does, the above bug is NOT there with 1.1.7. I guess it's been fixed.
Resolving WORKSFORME as per comment #3
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.