Commit e1cc8293 authored by Julien Muchembled's avatar Julien Muchembled

Small clean-up

parent 924f1ca5
...@@ -279,11 +279,6 @@ class Recipe(EnvironMixin): ...@@ -279,11 +279,6 @@ class Recipe(EnvironMixin):
and os.path.exists(self.buildout_prefix)): and os.path.exists(self.buildout_prefix)):
log.info('Getting installed file lists') log.info('Getting installed file lists')
parts += self.get_installed_files(compile_dir) parts += self.get_installed_files(compile_dir)
if is_true(
self.options.get('keep-compile-dir') or
self.buildout['buildout'].get('keep-compile-dir')):
self.generate_build_environment_script(configure_cmd, make_cmd, install_cmd)
log.info('A shell script slapos.recipe.build.env.sh has been generated.')
except: except:
self.generate_build_environment_script(configure_cmd, make_cmd, install_cmd) self.generate_build_environment_script(configure_cmd, make_cmd, install_cmd)
log.error('Compilation error. The package is left as is at %s where ' log.error('Compilation error. The package is left as is at %s where '
...@@ -291,14 +286,17 @@ class Recipe(EnvironMixin): ...@@ -291,14 +286,17 @@ class Recipe(EnvironMixin):
'A shell script slapos.recipe.build.env.sh has been generated. ' 'A shell script slapos.recipe.build.env.sh has been generated. '
'You can source it in your shell to reproduce build environment.', 'You can source it in your shell to reproduce build environment.',
os.getcwd()) os.getcwd())
raise raise
keep_compile_dir = is_true(
self.options.get('keep-compile-dir') or
self.buildout['buildout'].get('keep-compile-dir'))
if keep_compile_dir:
self.generate_build_environment_script(configure_cmd, make_cmd, install_cmd)
log.info('A shell script slapos.recipe.build.env.sh has been generated.')
finally: finally:
os.chdir(current_dir) os.chdir(current_dir)
if url and not is_true( if url and not keep_compile_dir:
self.options.get('keep-compile-dir') or
self.buildout['buildout'].get('keep-compile-dir')):
shutil.rmtree(compile_dir) shutil.rmtree(compile_dir)
# Check promises # Check promises
......
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