Skip to content

Commit

Permalink
Minimize package manager calls
Browse files Browse the repository at this point in the history
Fast dom0 package installation as it only calls the updatevm proxy once.
Important on slow networks.
  • Loading branch information
ben-grande committed Jul 16, 2024
1 parent 614ba57 commit f13b9f6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
10 changes: 5 additions & 5 deletions qvm/sys-gui-gpu.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ sys-gui-gpu-template:
qvm.template_installed:
- name: {{ salt['pillar.get']('qvm:sys-gui-gpu:template', 'fedora-40-xfce') }}

sys-gui-gpu-installed:
pkg.installed:
- pkgs:
- qubes-input-proxy-sender
{% if 'psu' in salt['pillar.get']('qvm:sys-gui-gpu:dummy-modules', []) %}
dummy-psu-sender:
pkg.installed: []
- dummy-psu-sender
{% endif %}

qubes-input-proxy-sender:
pkg.installed: []

{% from "qvm/template.jinja" import load -%}
{% from "qvm/template-gui.jinja" import gui_common -%}

Expand Down
11 changes: 7 additions & 4 deletions qvm/sys-gui-vnc.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
{{ salt['pillar.get']('qvm:sys-gui-vnc:template', 'fedora-40-xfce') }}:
qvm.template_installed: []

{% if 'psu' in salt['pillar.get']('qvm:sys-gui-vnc:dummy-modules', []) or 'backlight' in salt['pillar.get']('qvm:sys-gui-vnc:dummy-modules', []) %}
sys-gui-vnc-installed:
pkg.installed:
- pkgs:
{% if 'psu' in salt['pillar.get']('qvm:sys-gui-vnc:dummy-modules', []) %}
dummy-psu-sender:
pkg.installed: []
- dummy-psu-sender
{% endif %}
{% if 'backlight' in salt['pillar.get']('qvm:sys-gui-vnc:dummy-modules', []) %}
dummy-backlight-dom0:
pkg.installed: []
- dummy-backlight-dom0
{% endif %}
{% endif %}

{% from "qvm/template.jinja" import load -%}
Expand Down
11 changes: 7 additions & 4 deletions qvm/sys-gui.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
{{ salt['pillar.get']('qvm:sys-gui:template', 'fedora-40-xfce') }}:
qvm.template_installed: []

{% if 'psu' in salt['pillar.get']('qvm:sys-gui:dummy-modules', []) or 'backlight' in salt['pillar.get']('qvm:sys-gui:dummy-modules', []) %}
sys-gui-installed:
pkg.installed:
- pkgs:
{% if 'psu' in salt['pillar.get']('qvm:sys-gui:dummy-modules', []) %}
dummy-psu-sender:
pkg.installed: []
- dummy-psu-sender
{% endif %}
{% if 'backlight' in salt['pillar.get']('qvm:sys-gui:dummy-modules', []) %}
dummy-backlight-dom0:
pkg.installed: []
- dummy-backlight-dom0
{% endif %}
{% endif %}

{% from "qvm/template.jinja" import load -%}
Expand Down

0 comments on commit f13b9f6

Please sign in to comment.