fix(chv-guest): B-17 Playwright 安装加 --break-system-packages
- 第二轮真机构建实测:单次 virt-customize 在 playwright 步 失败,pip3 install --no-cache-dir playwright 在 Ubuntu 24.04 上报 PEP 668 externally-managed-environment 而拒绝安装; 随后 python3 -m playwright 报 No module named playwright。 此前 PLAYWRIGHT 默认 0,该步从未在默认构建里跑过,缺口 被默认开启暴露出来。 - 修复:playwright 的 pip 安装与第一处 pip 安装同款口径 (--break-system-packages,失败回落无 flag 再试),且只有 pip 成功才跑 python3 -m playwright install --with-deps chromium(括号分组 + &&,失败即停,不再以 ; 带病续跑)。 - 第二轮中间证据:B-10 步已过(sshd -t 完成、99-chv.conf 与 cloud-init hostkey 配置已写入、客机 /etc/ssh 无残留 host key;dpkg/pip freeze 已写 876/92 行)。
This commit is contained in:
1 parent
368bccd16e
commit
b5e75f156d
1 file changed
+1
-1
+1
-1
@@ -191,7 +191,7 @@ VC_ARGS=(-a "$OUT/disk.raw"
|
||||
--run-command 'dpkg-query -W -f "${Package} ${Version}\n" > /app/guest-versions-dpkg.txt; pip3 freeze > /app/guest-versions-pip.txt || true')
|
||||
if [ "${PLAYWRIGHT:-1}" = "1" ]; then
|
||||
VC_ARGS+=(
|
||||
--run-command 'pip3 install --no-cache-dir playwright; python3 -m playwright install --with-deps chromium'
|
||||
--run-command '(pip3 install --no-cache-dir --break-system-packages playwright || pip3 install --no-cache-dir playwright) && python3 -m playwright install --with-deps chromium'
|
||||
--run-command 'dpkg-query -W -f "${Package} ${Version}\n" > /app/guest-versions-dpkg.txt; pip3 freeze > /app/guest-versions-pip.txt || true'
|
||||
--run-command 'ls /root/.cache/ms-playwright/ > /app/guest-versions-chromium.txt 2>/dev/null || true')
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user