Bug 410897 - Make calculation of total used/freed disk space after pkg installation accessible outside zypper
Summary: Make calculation of total used/freed disk space after pkg installation access...
Status: RESOLVED WONTFIX
: 551678 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: libzypp (show other bugs)
Version: 13.1 Milestone 0
Hardware: Other Other
: P3 - Medium : Enhancement (vote)
Target Milestone: 13.1 Milestone 0
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 325922
  Show dependency treegraph
 
Reported: 2008-07-21 14:36 UTC by Katarina Machalkova
Modified: 2018-04-13 17:17 UTC (History)
2 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katarina Machalkova 2008-07-21 14:36:34 UTC
Before confirming package installation/removal, zypper prints a nice summary that looks like: "Overall download size X.Y M, after the operation A.B M will be used" (similarly for pkg removal). Zypper calculates these numbers by iterating over all resolvables with to_be_installed/to_be_removed flag and summing up their sizes. 

Total download size is calculated also in YCP pkg-bindings (where it is slightly more complicated by summing up the sizes by different repositories - anyway, don't fully understand that :) ).

Now I'd like to re-use this functionality (show the user how much MBs will be downloaded, installed, deleted) also in ncurses-pkg. There is several years old bloated code in patch selector that i) calculates total download size, ii) does the iteration over all selectables for every single patch status change, which is extremely clumsy iii) this is actually the third place where +- the same code is used

Could the code which is used in zypper please be moved somewhere else, so that it can be re-used in pkg selectors and/or pkg-bindings? It could, for example, have the form of the functions returning the sums in zypp::ByteCount for total download size, installed size, and removed size (if applicable)
Comment 1 Jan Kupec 2008-07-21 15:10:59 UTC
This is really desirable. It could be implemented in a form of a PoolStatistics class, which would lazily compute them on request from the current pool. It could have methods like computeAll(), getDownloadSize() (taking deltarpms into account by checking their availability bug #325922), getTargetSpaceChange(), getToInstallSize(), getToInstallCount(ResKind), getToUpgradeCount(ResKind), etc...
Comment 2 Jan Kupec 2008-07-29 12:36:03 UTC
I'll take care of this while doing bug #389128.
Comment 3 Jan Kupec 2010-09-29 14:28:41 UTC
11.1 -> 11.4
Comment 5 Michael Andres 2012-09-26 07:18:59 UTC
Space computation is still an issue.
Comment 6 Michael Andres 2012-09-26 07:20:44 UTC
*** Bug 551678 has been marked as a duplicate of this bug. ***
Comment 7 Tomáš Chvátal 2018-04-13 17:17:14 UTC
This is automated batch bugzilla cleanup.

The openSUSE Tumbleweed changed its development model at the end of
year 2014. [1]
Which means that most of the older bugs are reported against completely
different product than the current release of openSUSE Tumbleweed.

There is very high probability that this bug is no-longer relevant at all.
As a result we are closing this bug.

If you can reproduce this bug against a current Tumbleweed installation of
openSUSE, or you can still observe it under openSUSE Leap 15.0, please
feel free to reopen this bug.

Thank you for reporting this bug and we are sorry it was not resolved
under the old product.

[1] https://en.opensuse.org/Portal:Tumbleweed