CommandEnvironment commandEnvironment = buildEnvironmentWithProxy(target);
commandEnvironment.put("DEBIAN_FRONTEND", "noninteractive");
log.info("Installing APT packages: " + Joiner.on(",").join(packageNames));
Command command = Command.build("apt-get install --yes");
for (String packageName : packageNames) {
command.addQuoted(packageName);
}
target.executeCommand(command.setEnvironment(commandEnvironment).setTimeout(TimeSpan.TEN_MINUTES));
flushCache(target);
}