[fuel-plugin-builder] execution of pre_build_hook depends on current directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
Medium
|
Georgy Kibardin |
Bug Description
Detailed bug description:
fpb executes pre_build_hook from current directory. In case pre_build_hook depends on files in root directory of plugin fpb fails with error "Shell command executed with "127" exit code: lcm-plugin/
Steps to reproduce:
1. create simle plugin from examples
2. create script prebuildhook.sh in root directory of plugin with any code
3. create pre_build_hook file with next lines:
#!/bin/bash
./prebuildhook.sh
4. cd to your home dir
5. fpb --build plugin_dir
Expected results:
fpb build plugin successfully.
Actual result:
fpb fails with next error:
"Shell command executed with "127" exit code: lcm-plugin/
Reproducibility:
always
Workaround:
do not use relative paths in pre_build_hook script. Do 'popd && cd basename $0' at start of pre_build_hook and pushd at the end.
Impact:
Description of the environment:
Operation system: Centos 7 with fpb installed from master branch of fuel-plugins repo.
Versions of components: latest fpb installed from master branch of fuel-plugins repo.
Reference architecture: N/A
Network model: N/A
Related projects installed: N/A
Additional information:
I suggest a simple fix :
--- a/fuel_
+++ b/fuel_
@@ -79,7 +79,7 @@ class BaseBuildPlugin
def run_pre_
if utils.which(
- utils.exec_
+ utils.exec_
def add_checksums_
Changed in fuel: | |
milestone: | none → 10.0 |
assignee: | nobody → Fuel Sustaining (fuel-sustaining-team) |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: area-python |
Changed in fuel: | |
assignee: | Fuel Sustaining (fuel-sustaining-team) → Georgy Kibardin (gkibardin) |
Changed in fuel: | |
status: | Triaged → In Progress |
Fix proposed to branch: master /review. openstack. org/335395
Review: https:/