Bug 135245

Summary: rpm refuses to install package
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Stefan Nordhausen <nordhaus>
Component: BasesystemAssignee: Michael Schröder <mls>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Output of "rpm -ivvv"

Description Stefan Nordhausen 2005-11-22 23:24:34 UTC
Trying to install the OpenOffice debuginfo rpm from [1] I got the following message from rpm:

# rpm -iv --nodeps --force OO.rpm
Preparing packages for installation...
        installing package OpenOffice_org-debuginfo-2.0.0.99.137-0.2 needs 577MB on the / filesystem

The strange thing is that I have enough free space:
# df -h /
Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
/dev/hda6             4,0G  3,2G  760M  82% /

Interestingly, when I look at the rpm with the midnight commander, it tells me that the size of the package is 1,232,941,753 bytes (approx. twice of what rpm said it would need). The filesystem on / is reiserfs, I checked the integrity of the rpm in question with --checksig. This bug is probably similar/identical to bug #47845, but this time we can hopefully debug this!


[1] ftp://ftp.suse.com/pub/projects/OpenOffice.org/10.0-i386/2.0.0.99.137-0.2/
Comment 1 Stefan Nordhausen 2005-11-22 23:28:36 UTC
Created attachment 58317 [details]
Output of "rpm -ivvv"
Comment 2 Stefan Nordhausen 2005-11-22 23:47:47 UTC
Looking at my own logfile again, the numbers changed from "needs 577MB" to "needs  544MB". So this is not how much space it needs, but how much _additional_ space it needs. After creating a big file on / it now tells me it needs 878MB.

So this is a case of an error message being _extremely_ misleading. At least misleading enough to confuse the 3 guys working on bug #47845 back in 2003 to not find the correct answer. Also confused me quite a bit. Please change that error message!
Comment 3 Michael Schröder 2005-11-23 10:52:18 UTC
Well, the code is actually pretty obvious:

        if (dsi->bavail > 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
            rpmpsAppend(ps, RPMPROB_DISKSPACE,
                        rpmteNEVR(te), rpmteKey(te),
                        ts->filesystems[i], NULL, NULL,
           (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize);
        }          

So yes, it is the additional space.
I'm not sure if I should change the message as 1) all the localized strings have to get adjusted as well and 2) some programs might parse rpm's output.
Comment 4 Stefan Nordhausen 2005-11-25 21:13:12 UTC
Then don't change the message format, just change the number. In my case, if rpm had told me

"...needs 1233MB on the / filesystem"

I would have been perfectly happy. Because now the message is correct and I would have known that I do not have enough space. The string can still be parsed and nothing needs to be localized.
Comment 5 Michael Schröder 2006-01-10 15:17:03 UTC
Fixed in STABLE, but I'm still not very happy about this... Let's see if anybody complains...