Bug 293039

Summary: libzypp: Broken calculation of installing RPM size
Product: [openSUSE] openSUSE 10.3 Reporter: Ladislav Michnovic <lmichnovic>
Component: libzyppAssignee: Michael Andres <ma>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Blocker    
Priority: P5 - None CC: dmacvicar, kkaempf, lslezak, per, supertik1010
Version: Beta 1   
Target Milestone: ---   
Hardware: i586   
OS: Other   
Whiteboard: refactored-libzypp
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screenshot
yast2 logs

Description Ladislav Michnovic 2007-07-19 12:26:04 UTC
Created attachment 151884 [details]
screenshot

The installation summary and thermometer in YaST2 sw_single shows 0 size of RPMs which will be installed. Some of RPMs were selected of course. ;)
Comment 1 Ladislav Michnovic 2007-07-19 12:28:17 UTC
Created attachment 151885 [details]
yast2 logs
Comment 2 Ladislav Slezák 2007-07-25 06:24:24 UTC
Libzypp doesn't support disk usage counting (needs to be reimplemented after refactoring).
Comment 4 Stanislav Visnovsky 2007-08-06 07:42:33 UTC
Increasing severity, regression.
Comment 5 Stephan Binner 2007-08-06 07:47:05 UTC
*** Bug 297566 has been marked as a duplicate of this bug. ***
Comment 8 Ladislav Michnovic 2007-08-08 14:20:02 UTC
The problem is in Beta 1 also.
Comment 9 Stephan Binner 2007-08-10 10:35:19 UTC
*** Bug 299185 has been marked as a duplicate of this bug. ***
Comment 10 Stephan Binner 2007-08-10 17:51:28 UTC
*** Bug 299405 has been marked as a duplicate of this bug. ***
Comment 11 Ladislav Slezák 2007-08-13 07:03:53 UTC
*** Bug 298947 has been marked as a duplicate of this bug. ***
Comment 14 Duncan Mac-Vicar 2007-08-27 15:40:41 UTC
I just tested with Stefan the UI with 3.18.4 and it works. We also confirmed that in 3.18.2 it was not working. So this is the milestone version:

-------------------------------------------------------------------
Tue Aug 21 13:06:44 CEST 2007 - dmacvicar@suse.de

- If no mount information is available, parse all DU entries.
Comment 15 Duncan Mac-Vicar 2007-08-28 10:54:13 UTC
Ok, to make sure it will work in installation.

If disk partition is set manually to ZYpp, then that will be used for parsing.
If it is not set, they will be detected (or try to)

After that, if the partitions are empty (either by manual set, or because no detection results) everything in packages.DU is taken into account.
If it is not empty (running system) only needed paths are taken into account.

I just need to verify that DiskUsageCounter::detectPartitions() gives a empty result before YaST set the partitions. Ladislav?
Comment 16 Ladislav Slezák 2007-08-29 08:34:28 UTC
DiskUsageCounter::detectMountPoints() reads the current partitioning from the system, it's called from Pkg::SetCurrentDU() (an internal helper, not available from YCP). It always return non-empty result (unless the system doesn't have any mounted partition).

SetCurrentDU() is used in Pkg::TargetInitDU() when the parameter map is empty or in Pkg::TargetGetDU() when the partitioning hasn't been set.

According my install log the first call durin installation sets the partitioning so SetCurrentDU() shouldn't be called during installation:

2007-08-27 08:34:58 <1> 10.20.1.7(3492) [wfm] clients/wrapper_storage.ycp:367 Pkg Builtin called: TargetInitDU
2007-08-27 08:34:58 <1> 10.20.1.7(3492) [wfm] Target.cc(TargetInitDU):623 Adding /
2007-08-27 08:34:58 <1> 10.20.1.7(3492) [wfm] Target.cc(TargetInitDU):623 Adding home


I think you probably mean ZYpp::getPartitions() - yes, it returns empty partitioning until it's set by Yast.
Comment 17 Klaus Kämpf 2007-08-29 13:41:20 UTC
Space is provided fine by plaindir, verified. 
Comment 18 Duncan Mac-Vicar 2007-08-29 14:41:27 UTC
package size works in installation. small issue with initialized pointer fixed in last submssion.
Comment 20 Duncan Mac-Vicar 2007-08-30 14:41:31 UTC
closing