fix(xfce_browser): stop pinning Chrome build + fix broken availability regex

Deploy failed on ubuntu26 with "no available installation candidate for
google-chrome-stable=149.0.7827.114-1": Google's apt repo only ever carries the
current stable, so any pinned build vanishes within weeks.

Two fixes:
- defaults: xfce_google_chrome_version "" (install latest google-chrome-stable);
  pin is opt-in and now safe (auto-falls back to latest when the pin is gone).
- browser.yml: the madison availability guard used POSIX [[:space:]], which
  Python re does not support, so it never matched ' | ' separators. Replace with
  \s — verified: empty->latest, pinned+available->pin, pinned+gone->latest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Haitao Pan 2026-06-25 22:14:46 +08:00
parent 5aadb4f0dc
commit e174e8bcfa
2 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,10 @@ xfce_packages:
- fonts-noto-cjk
- xserver-xorg-core
xfce_google_chrome_version: "149.0.7827.114-1"
# 不钉具体构建号Google apt 源只保留当前 stable任何固定版本几周后即消失
# 导致 "no available installation candidate"。留空 = 装当前可用的 google-chrome-stable。
# 如确需复现某版本,可设为该 madison 中仍存在的版本串(缺失时自动回退最新)。
xfce_google_chrome_version: ""
xfce_google_chrome_apt_key_url: "https://dl.google.com/linux/linux_signing_key.pub"
xfce_google_chrome_apt_keyring: "/etc/apt/keyrings/google-linux-signing-key.gpg"
xfce_google_chrome_apt_source: "deb [arch=amd64 signed-by={{ xfce_google_chrome_apt_keyring }}] https://dl.google.com/linux/chrome/deb/ stable main"

View File

@ -127,7 +127,7 @@
if (
xfce_browser_package == 'google-chrome-stable'
and (xfce_google_chrome_version | length) > 0
and (xfce_google_chrome_versions.stdout | default('') is search('\\|[[:space:]]*' ~ (xfce_google_chrome_version | regex_escape) ~ '[[:space:]]*\\|'))
and (xfce_google_chrome_versions.stdout | default('') is search('\\|\\s*' ~ (xfce_google_chrome_version | regex_escape) ~ '\\s*\\|'))
)
else xfce_browser_package
}}