fix: remove extraneous package repository updates

Updates happens multiple times, normally 2 to 3, even if we consider a
state without includes. On states with multiple includes, it could
easily get approximately 10 updates being ran. This behavior leads to
unnecessary network bandwidth being spent and more time to run the
installation state. When the connection is slow and not using the
cacher, such as torified connections on Whonix, the installation can
occurs much faster.

Adding external repositories has to be done prior to update to ensure it
is also fetched.

Fixes: https://github.com/ben-grande/qusal/issues/29
This commit is contained in:
Ben Grande 2024-03-18 16:29:01 +01:00
parent fc2af9b619
commit f9ead06408
96 changed files with 480 additions and 446 deletions

View file

@ -1,18 +1,18 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% if grains['nodename'] != 'dom0' -%}
"{{ slsdotpath }}-updated":
pkg.uptodate:
- refresh: True
include:
- utils.tools.common.update
"{{ slsdotpath }}-installed":
pkg.installed:
- refresh: True
- require:
- sls: utils.tools.common.update
- install_recommends: False
- skip_suggestions: True
- pkgs: