fix(host): query package allowlist without literal quotes

This commit is contained in:
archipelago
2026-08-31 10:44:15 -04:00
parent 5b6d278c46
commit b300a720db
+4 -5
View File
@@ -131,11 +131,10 @@ async fn run_host_fixups() -> Result<()> {
/// install without `apt-get update` first; only if that fails (fresh suite,
/// stale index), update once and retry. Both under timeout, both non-fatal.
async fn ensure_packages() -> Result<bool> {
let wanted = HOST_PACKAGES
.iter()
.map(|p| format!("'{p}'"))
.collect::<Vec<_>>()
.join(" ");
// Package names are a fixed internal allowlist. Do not embed shell quote
// characters in WANTED: quotes produced by variable expansion are data,
// so dpkg-query would look for a package literally named 'kdump-tools'.
let wanted = HOST_PACKAGES.join(" ");
let script = format!(
r#"
set -u