PBR

When generating local console scripts, should give user a option to decide whether add –O to ‘executable’, such as /usr/bin/python -O

Bug #1619560 reported by lijunli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Incomplete
Undecided
lijunli

Bug Description

Currently, after installing openstack, such as openstack/cinder, all console scripts under /usr/bin have the top one line like “#!/usr/bin/python”. This will result to a problem if only .pyo left.
Below I will take a example using cinder.
Steps to reproduce:
1. compile cinder project to pyo
# python -O -m compileall /usr/lib/python2.7/site-packages/cinder
2. rm all .py
#rm –fr `find /usr/lib/python2.7/site-packages/cinder –name “*.py”`
3. restart all cinder services

Excepted result:
4. All cinder services restart successfully
Actual result
3.All cinder services restart failed

If changing ‘/usr/bin/python’ to ‘/usr/bin/python -O’ in all cinder console scripts, then all cinder services will restart successfully.
So, I think when generating console script by pbr, It should give user a option to decide whether to add –O option in ‘executable’.

lijunli (lijunli)
Changed in pbr:
assignee: nobody → lijunli (lijunli)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to pbr (master)

Fix proposed to branch: master
Review: https://review.openstack.org/364759

Revision history for this message
Robert Collins (lifeless) wrote :

I'm sorry, I'm not sure where the bug is: you've done something we don't support (used compileall to build a -O version of everything **and** removed the source), and as a result it doesn't work... don't do that.

Either leave the source code in place, or don't use .pyo seem to be very good approaches here.

Whats the actual use case you're trying to satisfy? I don't want to prevent a valid usecase being met, but as it stands this doesn't make sense to me as a bug.

Changed in pbr:
status: In Progress → Incomplete
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on pbr (master)

Change abandoned by ChangBo Guo(gcb) (<email address hidden>) on branch: master
Review: https://review.openstack.org/364759
Reason: please restore this if you want to continue working on this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.