From fd044982d9fda26b2f7f9ba5364f8473378b1a98 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 14 Jun 2013 12:32:14 -0700 Subject: [PATCH] packer: Additional comments --- packer/build.go | 3 +++ packer/builder.go | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/packer/build.go b/packer/build.go index bc166a8d2..2f4f811c6 100644 --- a/packer/build.go +++ b/packer/build.go @@ -26,6 +26,9 @@ type Build interface { // enabled by adding the additional key "packer_debug" to boolean // true in the configuration of the various components. This must // be called prior to Prepare. + // + // When SetDebug is set to true, parallelism between builds is + // strictly prohibited. SetDebug(bool) } diff --git a/packer/builder.go b/packer/builder.go index 2b5e9eef4..c2e945572 100644 --- a/packer/builder.go +++ b/packer/builder.go @@ -2,6 +2,14 @@ package packer // Implementers of Builder are responsible for actually building images // on some platform given some configuration. +// +// In addition to the documentation on Prepare above: Prepare is sometimes +// configured with a `map[string]interface{}` that has a key "packer_debug". +// This is a boolean value. If it is set to true, then the builder should +// enable a debug mode which allows builder developers and advanced users +// to introspect what is going on during a build. During debug builds, +// parallelism is strictly disabled, so it is safe to request input from +// stdin and so on. type Builder interface { // Prepare is responsible for configuring the builder and validating // that configuration. Any setup should be done in this method. Note that