ben-grande / qusal

Salt Formulas for Qubes OS.
19 stars 7 forks source link

Use a single update state #29

Closed ben-grande closed 6 months ago

ben-grande commented 7 months ago

Current problem (if any)

The salt module pkg.uptodate is called on every installation state. The problem occurs when a state references multiple installation states, thus pkg.uptodate is called several times.

Note that pkg.installed is also called several times, but that is harder to fix because the package names vary while to update, there is no argument list.

Proposed solution

A global state that is called by the include in the installation states, thus referencing a single pkg.uptodate.

The value to a user, and who that user might be

Faster installation of the states for both users and developers. Especially important on Whonix qubes due to Tor network latency and not using the cacher.

ben-grande commented 6 months ago

Qubes runs an update on every package installation already:

Refresh is necessary only once, it may be necessary twice when adding an external repository, it should guarantee to update the package list after the repository definition has been added.

Qubes doing automatic update checks also slows down apt returning after installation of packages.

ben-grande commented 6 months ago

First post does not make a clear distinction of pkg.uptodate and pkg.installed refresh= option. The first upgrades the whole system if no packages are specified (update + upgrade) while the latter (updates + install/upgrade) the desired packages.