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

swupd: list installed optional bundles / list packages in bundle (similar to 'dnf info')

Open ilmarn opened this issue 5 years ago • 12 comments

swupd currently lacks many features compared to dnf/apt/... and its pretty hard to find what is installed or will be installed by 'bundle-add'. also adding confirmation (are you sure: yes/no) to bundle-add/bundle-remove also nice to have with ability to override from command line parameters

ilmarn avatar Oct 15 '19 11:10 ilmarn

@phmccarty can you move this to swupd? Looks like I don't have the right to move there (I have the right to move from here).

I noticed that yesterday too. swupd search told me that installing something was 40 MB. So I bundle-added it, and it proceeded to download 650 MB of content.

thiagomacieira avatar Oct 15 '19 15:10 thiagomacieira

Sure, I am transferring the issue

phmccarty avatar Oct 15 '19 15:10 phmccarty

some of this information will be provided by the bundle-info command that will be part of the next swupd release. The bundle-info command can currently show the bundles that are included with it and / or a list of files to be installed, the maximum size the bundle will take on disk if installed among other things. The command is still lacking some of its planned functionality, so it is ok to leave this issue open for now to make sure we are considering these suggestions.

The confirmation message request should go in a separate issue.

castulo avatar Oct 17 '19 23:10 castulo

Is there any way to get list of installed optional packages in current version?

ilmarn avatar Oct 18 '19 05:10 ilmarn

Is there any way to get list of installed optional packages in current version?

Not now, at the moment there is no way for swupd to find that out, to implement this, mixer will have to make this info available to swupd first.

castulo avatar Oct 18 '19 18:10 castulo

I was re-reading this issue and I wanted to confirm what is being requested here.

Looks like what you are requesting on this issue are two things:

  1. Have a way of listing all bundles installed in the system that are optional
  2. Have a way of listing all packages included in a bundle

First of all, am I getting your request correctly @ilmarn ?

The one in 1) is tricky because bundleC may be an optional bundle for bundleA but may be a required bundle for bundleB, so bundleC would not really be optional. I guess optional bundles in this context would be installed bundles that are optional (also-add) to all other installed bundles in the system, therefore if it was to be removed from the system, all other bundles would not complain.

castulo avatar Jan 15 '20 17:01 castulo

I think that could be a good start. My idea behind this enhancement is to get info why I have this bundle/package installed and who depends on it

ilmarn avatar Jan 17 '20 17:01 ilmarn

I think that could be a good start. My idea behind this enhancement is to get info why I have this bundle/package installed and who depends on it

If that is all you need you can get that info using swupd bundle-list --has-dep. For example:

$ sudo swupd bundle-list --has-dep samba
Installed bundles that have samba as a dependency:
 - os-clr-on-clr
 - os-clr-on-clr-dev
 - storage-utils
 - storage-utils-dev
 - user-basic

Bundle 'samba' is required by 5 bundles

castulo avatar Jan 17 '20 18:01 castulo

@ilmarn I just opened another issue for implementing something that may also be useful for what you are looking for. Take a look at this -> #1272.

castulo avatar Jan 17 '20 19:01 castulo

yes, #1272 is what i was looking

I noticed that yesterday too. swupd search told me that installing something was 40 MB. So I bundle-added it, and it proceeded to download 650 MB of content.

im not sure if this was fixed already

ilmarn avatar Jan 18 '20 18:01 ilmarn

yes, #1272 is what i was looking

I noticed that yesterday too. swupd search told me that installing something was 40 MB. So I bundle-added it, and it proceeded to download 650 MB of content.

im not sure if this was fixed already

swupd search will only show you the size of the files directly included by that bundle, however, if that bundle has other bundles as dependency, the size of the files that are included by those bundles won't be included in the size. This is a current limitation with swupd search.

If you want to know a more accurate value of the size a bundle will take on disk in your system you should use bundle-info instead. This command will show the size of the files included by the bundle but will also consider the bundle dependencies when calculating the size it will take on disk.

$ sudo swupd bundle-info editors
__________________________
 Info for bundle: editors
__________________________

Status: Not installed
Latest available version: 31980

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

castulo avatar Jan 20 '20 18:01 castulo

This enhancement has also been requested in the forum https://community.clearlinux.org/t/what-have-i-installed/4653/6?u=inmanturbo

inmanturbo avatar May 23 '20 17:05 inmanturbo