From 3d9fe1fb048c48b715e1a6fc870f6aa95fe1168b Mon Sep 17 00:00:00 2001 From: Samuel James Date: Thu, 3 Sep 2026 15:42:00 +0000 Subject: [PATCH] thinkcenter-kdenlive: drop nonexistent frei0r-plugins-data; pre-filter pkg list to available-only (never abort on a bad name) --- .../playbooks/thinkcenter-kdenlive.yml | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/life-church/playbooks/thinkcenter-kdenlive.yml b/life-church/playbooks/thinkcenter-kdenlive.yml index e108bae..0f78264 100644 --- a/life-church/playbooks/thinkcenter-kdenlive.yml +++ b/life-church/playbooks/thinkcenter-kdenlive.yml @@ -71,8 +71,7 @@ kdenlive_packages: - kdenlive # the editor (pulls MLT, Qt/KF5 automatically) - breeze-icon-theme # fixes blank toolbar icons on Cinnamon - - frei0r-plugins # video effects/transitions via MLT - - frei0r-plugins-data + - frei0r-plugins # video effects/transitions via MLT (data bundled in this pkg) - swh-plugins # LADSPA audio effects - ladspa-sdk - libavcodec-extra # broad/restricted codec support (import fixes) @@ -97,32 +96,57 @@ retries: 3 delay: 15 - # libavcodec-extra can prompt/conflict with the base libavcodec; allow apt - # to resolve it. If that one package fails, retry without it so Kdenlive - # itself still installs (rescue path). - - name: "[apt] Install Kdenlive + effects + codecs (retry on dpkg lock)" + # Robustness: never let a single wrong package name abort the run. Query + # apt-cache for each desired package and install only the ones that exist, + # warning about any that don't. `kdenlive` itself is asserted mandatory. + - name: "[apt] Determine which desired packages actually exist in apt" + ansible.builtin.shell: >- + for p in {{ kdenlive_packages | join(' ') }}; do + if apt-cache show "$p" >/dev/null 2>&1; then echo "$p"; fi + done + args: + executable: /bin/bash + register: pkg_probe + changed_when: false + + - name: "[apt] Compute available vs missing" + ansible.builtin.set_fact: + pkgs_available: "{{ pkg_probe.stdout_lines }}" + pkgs_missing: "{{ kdenlive_packages | difference(pkg_probe.stdout_lines) }}" + + - name: "[apt] Warn about any unavailable packages (non-fatal)" + ansible.builtin.debug: + msg: "Skipping packages not present in apt on this host: {{ pkgs_missing }}" + when: pkgs_missing | length > 0 + + - name: "[apt] Assert Kdenlive itself is available" + ansible.builtin.assert: + that: "'kdenlive' in pkgs_available" + fail_msg: "The 'kdenlive' package is not available in apt — cannot proceed." + + - name: "[apt] Install available Kdenlive package set (retry on dpkg lock)" block: - - name: "[apt] Install full Kdenlive package set" + - name: "[apt] Install packages" ansible.builtin.apt: - name: "{{ kdenlive_packages }}" + name: "{{ pkgs_available }}" state: present register: kden_install until: kden_install is succeeded retries: 3 delay: 15 rescue: - - name: "[apt] FALLBACK — install Kdenlive core without libavcodec-extra" + - name: "[apt] FALLBACK — install Kdenlive core only (drop optional extras)" ansible.builtin.apt: - name: "{{ kdenlive_packages | reject('equalto','libavcodec-extra') | list }}" + name: "{{ pkgs_available | reject('equalto','libavcodec-extra') | list }}" state: present register: kden_install_fallback until: kden_install_fallback is succeeded retries: 3 delay: 15 - - name: "[apt] Note codec-extra was skipped" + - name: "[apt] Note extras were reduced" ansible.builtin.debug: - msg: "libavcodec-extra could not be installed (likely held/conflict); Kdenlive core installed. Add codecs manually if a clip won't import." + msg: "Full set failed (likely libavcodec-extra conflict); installed Kdenlive core. Add codecs manually if a clip won't import." - name: "[verify] kdenlive binary present + version" ansible.builtin.command: kdenlive --version