Commit caa2881b authored by Jérome Perrin's avatar Jérome Perrin

slapos.recipe.build: restore support for build scripts

This fixes this error:
[2015-04-10 06:28:09,906] INFO         exec self.options['script']
[2015-04-10 06:28:09,906] INFO       File "<string>", line 6, in <module>
[2015-04-10 06:28:09,906] INFO     NameError: name 'env' is not defined

When installing busybox
parent d5dd1100
......@@ -277,6 +277,7 @@ class Script:
self.keep_on_error = True
else:
self.keep_on_error = False
def getEnvironment(self):
# prepare cool dictionary
wanted_env = {}
......@@ -313,6 +314,7 @@ class Script:
self.cleanup_dir_list.append(self.options['location'])
raise shutil.Error('Directory %s already exists' %
self.options['location'])
env = self.getEnvironment() # env is used in script exec'ed below
exec self.options['script']
try:
self._checkPromise('slapos_promise', self.options['location'])
......@@ -342,6 +344,7 @@ class Script:
if self.update_script is None:
return None
try:
env = self.getEnvironment() # env is used in script exec'ed below
exec self.options['update_script']
try:
self._checkPromise('slapos_update_promise', self.options['location'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment