Bug 995284

Summary: virtualenv 1.7.2 is buggy, please upgrade to 1.10.1
Product: Red Hat Software Collections Reporter: Rob Millner <rmillner>
Component: python-virtualenvAssignee: Robert Kuska <rkuska>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: high Docs Contact:
Priority: unspecified    
Version: python27CC: jberan, mfisher, rkuska, sochotni
Target Milestone: rcKeywords: Rebase
Target Release: 1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python27-python-virtualenv-1.10.1-2.el6 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of:
: 995549 997388 (view as bug list) Environment:
Last Closed: 2013-09-10 06:41:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 997388    
Attachments:
Description Flags
python-virtualenv specfile for 1.10.1 none

Description Rob Millner 2013-08-09 00:51:30 UTC
Description of problem:
virtualenv 1.7.2 does not create the python2 and python27 symlinks to python.  This causes scripts to be broken after "virtenv --relocatable" is run.

Version-Release number of selected component (if applicable):
virtualenv 1.7.2

How reproducible:
Always

Steps to Reproduce:
1. virtualenv --system-site-packages /path/to/virtenv
2. virtualenv --relocatable /path/to/virtenv

Actual results:
There is no python27 in the virualenv, but scripts refer to it.

Expected results:
There are two symlinks:
python2 -> python
python27 -> python

Additional info:

It appears that this is due to a whitespace error in the code.

Comment 2 Rob Millner 2013-08-09 05:08:38 UTC
Created attachment 784718 [details]
python-virtualenv specfile for 1.10.1

Comment 3 Rob Millner 2013-08-09 05:10:33 UTC
Went ahead and built for the latest version, specfile attached.

Comment 4 Stanislav Ochotnicky 2013-08-09 12:31:00 UTC
(In reply to Rob Millner from comment #3)
> Went ahead and built for the latest version, specfile attached.

With regards to current buggy version. I would assume that there is a workaround in the sense that those symlinks can be created manually after running virtualenv. Correct?

Comment 5 Rob Millner 2013-08-09 16:36:42 UTC
Correct - they can easily be created.

Comment 6 Stanislav Ochotnicky 2013-08-09 16:53:07 UTC
OK, due to existing workaround and GA getting close we'll move this to RHSCL 1.1. Going to clone this bug for release notes so that this is properly documented in the meantime.

Comment 7 Stanislav Ochotnicky 2013-08-09 17:22:42 UTC
Actually had a closer look...

Before runnning "virtualenv --relocatable" shebangs look like this:
#!/path/to/virtenv/bin/python

After running "--relocatable" shebangs get changed to:
#!/usr/bin/env python2.7

If you are inside scl-enabled environment the above shebang will correctly run python2.7 from PATH (which will be modified to include /opt/rh/python27/root/usr/bin/). Outside scl python library would not be resolved by linker either way.

Even if symlinks are manually created, they are not used by #!/usr/bin/env python2.7

Am I missing something?

Comment 8 Rob Millner 2013-08-13 03:36:18 UTC
The virtual environment has an "activate" script that puts it at the front of PATH, causing python2.7 and python2 to be resolved inside of it.

Comment 11 Robert Kuska 2013-08-16 09:25:26 UTC
I have updated source to 1.10.1.

Comment 18 errata-xmlrpc 2013-09-10 06:41:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1238.html