LogosLinuxInstaller icon indicating copy to clipboard operation
LogosLinuxInstaller copied to clipboard

Too many calls to pkexec during dependency checks

Open n8marti opened this issue 1 year ago • 6 comments

There are at least 4 calls to pkexec during dependency checks. See if they can be reduced to 1 call just for the actual install command. Listing installed packages and downloading new packages shouldn't required elevated privileges (at least not in Ubuntu derivatives). Maybe this isn't true for other distros.

Relatedly, test if winehq repos are actually needed for LLI to run properly.

n8marti avatar Jul 30 '24 22:07 n8marti

I don't believe any distro requires su for package queries, just downloads, installs, and removes, so that'd be a way to knock one out.

thw26 avatar Jul 31 '24 01:07 thw26

The installer works in the order:

  • query needed packages for install and remove
  • download packages needed for install in order to make sure that we can easily resume downloading.
  • install packages
  • remove packages

For Ubuntu, this is made worse by needing to PPAs in order to have Wine repo access to the unstable branch. SteamOS also has numerous commands that need to be run.

thw26 avatar Jul 31 '24 01:07 thw26

An option for simplifying some of the Ubuntu and Steam pre- and post- install commands would be to run them either as a bash script or to use the sh -c command so that we can throw several commands into one run.

thw26 avatar Jul 31 '24 01:07 thw26

The branch 144-dependency-review changes the GUI to install all packages in one command and removing the addition of the winehq repo. This only requires the password twice, once to download the packages and once to install them.

I think the TUI will either need a new superuser approach that replaces the current pkexec one (maybe one that uses sudo but falls back to pkexec?), or a new window approach that doesn't track per-package install progress.

n8marti avatar Aug 01 '24 19:08 n8marti

I'll do further testing to see if the winehq repo is needed elsewhere, but it doesn't seem to be needed in ubuntu.

n8marti avatar Aug 01 '24 19:08 n8marti

Let me see about making a password entry box. Should be simple with our existing set up. If so we can merge this for alpha14

thw26 avatar Aug 02 '24 13:08 thw26