hooks/{instsoft,updatebase}.GRMLBASE: be more careful about BUILD_ONLY environment.
authorMichael Prokop <mika@grml.org>
Mon, 27 Dec 2010 18:41:09 +0000 (19:41 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 27 Dec 2010 18:41:09 +0000 (19:41 +0100)
commitea8df13abc59d9a9bb36ad03e11c3467762443e3
tree479dfb83529e5624795293fcc20724e57add0fe4
parent74688640758a7bb148c7610b5d76f28ea2eb17a5
hooks/{instsoft,updatebase}.GRMLBASE: be more careful about BUILD_ONLY environment.

If BUILD_ONLY is available in the environment then we do not want
to update any packages but just build the ISO.  The script
instsoft.GRMLBASE is being executed *after* updatebase.GRMLBASE
and we run "skiptask instsoft" from updatebase.GRMLBASE. But this
might fail if the script exists too early due to errors.

This commit adds some further checks and also checks for
BUILD_ONLY inside instsoft.GRMLBASE.

Quoting ~log/fai/grml/softupdate-20101227_181604/fai.log from a failed execution:

  [...]
  Calling hook: updatebase.GRMLBASE
  Action softupdate of FAI (hooks/updatebase.GRMLBASE) via grml-live running
  mount: proc already mounted or /linuxuser/2010.12//grml_2010.12-rc1/grml_chroot/proc busy
  mount: according to mtab, proc is already mounted on /linuxuser/2010.12/grml_2010.12-rc1/grml_chroot/proc
  updatebase.GRMLBASE  FAILED with exit code 32.
  Skiping task_updatebase
  Calling hook: instsoft.GRMLBASE
  Action softupdate of FAI (hooks/instsoft.GRMLBASE) via grml-live running
  Get:1 http://deb.grml.org grml-stable Release.gpg [197 B]
  [...]
etc/grml/fai/config/hooks/instsoft.GRMLBASE
etc/grml/fai/config/hooks/updatebase.GRMLBASE