swupd-client icon indicating copy to clipboard operation
swupd-client copied to clipboard

Report total installation size of a bundle on swupd-search

Open nsauzede opened this issue 4 years ago • 3 comments

Using CLR 32190

Trying to install HDF5 dev package.

  1. Search possibly matching bundle :
~$ sudo swupd search hdf5-dev
Bundle with the best search result:
     machine-learning-basic         	- Build machine learning applications with a full suite of libraries.  (307MB) 

This bundle can be installed with:

  swupd bundle-add  machine-learning-basic

Alternative bundle options are
     R-extras-dev                   	- All packages required to build the R-extras bundle.  (4814MB) 
     os-clr-on-clr-dev              	- All packages required to build the os-clr-on-clr bundle.  (1978MB)
  1. Installing suggested bundle :
~$ sudo swupd bundle-add  machine-learning-basic
Loading required manifests...
Error: Bundle too large by 6035M
NOTE: currently, swupd only checks /usr/ (or the passed-in path with /usr/ appended) for available space
To skip this error and install anyways, add the --skip-diskspace-check flag to your command
Failed to install 1 of 1 bundles

=> The bundle install size doesn't match the advertised one (304MB vs. what.. 6300MB+ ??)

nsauzede avatar Jan 29 '20 09:01 nsauzede

This is because same packages are included in different bundles. And the size shown in swupd search doesn't subtract the size of packages that you installed via other bundles from the total size.

Sent with GitHawk

lebensterben avatar Jan 29 '20 17:01 lebensterben

swupd search will only show the size of the sum of files in the specified bundle, but it doesn't consider those bundles that are dependencies of the bundle you want to install. You might want to consider using swupd bundle-info instead, that command will consider all the bundle's dependencies and will also consider which of those dependencies you already have installed in your system, giving you a much closer approximation of the disk size you will need.

$ sudo swupd bundle-info machine-learning-basic
_________________________________________
 Info for bundle: machine-learning-basic
_________________________________________

Status: Not installed
Latest available version: 32120

Bundle size:
 - Size of bundle: 322.34 MB
 - Maximum amount of disk size the bundle will take if installed (includes dependencies): 484.81 MB

castulo avatar Jan 29 '20 17:01 castulo

I renamed the issue to point at the specific reported problem. As Castulo said swupd search is only reporting the size of that specific bundle, without including any dependency

otaviobp avatar Jan 29 '20 18:01 otaviobp