builder/amazon/chroot:

Delete files at destination before copy. This should help with the dangling
symbolic link issue we've been seeing with ubuntu.

fixes GH-500
pull/544/head
Matthew Hooker 13 years ago
parent fae3b96658
commit fa3e70ef75

@ -33,7 +33,7 @@ func (s *StepCopyFiles) Run(state multistep.StateBag) multistep.StepAction {
chrootPath := filepath.Join(mountPath, path)
log.Printf("Copying '%s' to '%s'", path, chrootPath)
cmdText, err := wrappedCommand(fmt.Sprintf("cp %s %s", path, chrootPath))
cmdText, err := wrappedCommand(fmt.Sprintf("cp --remove-destination %s %s", path, chrootPath))
if err != nil {
err := fmt.Errorf("Error building copy command: %s", err)
state.Put("error", err)

Loading…
Cancel
Save