Group SoftwareUpdater packages by dependency

In order to make it easier to understand why Haiku wants to update certain packages, I would group them by software/function. This way, it is easier to understand for the average user.

Currently, you are presented with a list of packages in alphabetic order:

development 1
haiku
library 1
library 2
program 1
program 2

This list can be very long. Mine is currently 72 packages, plus 3 new.

I would prefer if packages that is a dependency of another package are grouped together. That way the list will be smaller and it is easier to understand what libraries are used for.

[-] haiku
    - library 2
[-] program 1
    - library 1
    - development 1
[-] program 2
    - library 2

The list should not be expanded by default:

[+] haiku
[+] program 1
[+] program 2

Thoughts?

Haiku updates packages because new versions are available, irrelevant of what depends on does not depend on them.

Also, what do you do in this case?

program 1
    library 1
program 2
    also library 1
program 3
    library 1, again
1 Like

My proposal do not change what gets updated, only how it is presented to the user.

Exactly like you presented it. I included it in my example with library 2.

If we extend your example and pretend that the update is in progress by downloading library 1 and add library 2 and 3 that is currently not downloading:

[-] program 1 [Downloading 56%]
    - program 1 [100%]
    - library 1 [Downloading 86%]
[-] program 2 [Downloading 24%]
    - program 2
    - library 1 [Downloading 86%]
    - library 2
[-] program 3 [Downloading 42%]
    - program 3
    - library 1 [Downloading 86%]
    - library 3

Since default is to not expand, it would be presented to the users like this:

[+] program 1 [Downloading 56%]
[+] program 2 [Downloading 24%]
[+] program 3 [Downloading 42%]

If program 1 was WebPositive, it could be presented like this in expanded mode:

[-] [ICON] WebPositive [Downloading 23%]
    - haikuwebkit-1.8.2-1.hpkg [Downloading 45%]
    - tar-1.34-1.hpkg
    - webpositive-r1~beta3_hrevxxxx-1.hpkg

It can even get a bit more complicated (something I’m working on atm):

Schermafdruk van 2021-07-15 13-59-26

The idea of showing dependencies is interesting but it would results in confusing UI for the lambda user who could think that if a library appears twice, it is actually downloaded twice. I would prefer to have that dependencies info in a tab of HaikuDepot when selecting a package as it is done for files contained list.
I think that people who are not updating often and have a long list of packages are more concerned by the time it will take. They may find more useful to have an estimated time for whole update. .

As @PulkoMandy alerady pointed out, the package dependency is rather a tree than a grouping. And this is in an ideal case. So, presenting it the way you suggest may be difficult. Additionally, the package dependencies may also have their own 2nd level dependencies and so on.

The information of some package dependencies is good. And HaikuDepot shows an alert when a package needs some other packages installed in order to work.

Maybe it would be helpful to add (or is it already available) to HaikuDepot an option to sort packages by their status (not installed / installing / removing / installed) so all currently being installed packages are shown together?

There’s a column to show the repositories. For already installed packages the repository info is changed to system. Of course, as for other columns, you can click on column title to do the sorting.

That the dependency is a tree is irrelevant. It will be presented like pkgman update package:

/> pkgman update webpositive
...
The following changes will be made:
  in system:
    upgrade package haiku-r1~beta2_hrev55009-1 to r1~beta3_hrev55234-1 from repository Haiku
    upgrade package tar-1.33-1 to 1.34-1 from repository HaikuPorts
    upgrade package libedit-20180525_3.1-2 to 20210419_3.1-1 from repository HaikuPorts
    upgrade package expat-2.2.10-1 to 2.4.1-1 from repository HaikuPorts
    upgrade package libxml2-2.9.10-4 to 2.9.12-1 from repository HaikuPorts
    upgrade package libxml2_devel-2.9.10-4 to 2.9.12-1 from repository HaikuPorts
    upgrade package haikuwebkit-1.7.1-1 to 1.8.2-1 from repository HaikuPorts
    upgrade package haiku_devel-r1~beta2_hrev55009-1 to r1~beta3_hrev55234-1 from repository Haiku
    upgrade package webpositive-r1~beta2_hrev55009-1 to r1~beta3_hrev55234-1 from repository Haiku

The proposal is for SoftwareUpdater, not HaikuDepot.