Add provisioner shell to list installed apt packages (#13368)

This commit is contained in:
Paulo Santos
2025-11-27 16:16:19 +00:00
committed by GitHub
parent 79625a3639
commit a183847c57
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
#!/bin/bash -e
################################################################################
## File: list-dpkg.sh
## Desc: List all installed dpkg packages
################################################################################
echo "Listing all installed dpkg packages..."
dpkg-query -W -f='${Package} ${Version}\n' | sort

View File

@@ -191,6 +191,11 @@ build {
scripts = ["${path.root}/../scripts/build/configure-snap.sh"] scripts = ["${path.root}/../scripts/build/configure-snap.sh"]
} }
provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
script = "${path.root}/../scripts/build/list-dpkg.sh"
}
provisioner "shell" { provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
expect_disconnect = true expect_disconnect = true

View File

@@ -180,6 +180,11 @@ provisioner "shell" {
scripts = ["${path.root}/../scripts/build/configure-snap.sh"] scripts = ["${path.root}/../scripts/build/configure-snap.sh"]
} }
provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
script = "${path.root}/../scripts/build/list-dpkg.sh"
}
provisioner "shell" { provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
expect_disconnect = true expect_disconnect = true