Merge lp:~corey.bryant/charm-helpers/git-1531612 into lp:charm-helpers
Proposed by
Corey Bryant
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 515 | ||||
Proposed branch: | lp:~corey.bryant/charm-helpers/git-1531612 | ||||
Merge into: | lp:charm-helpers | ||||
Diff against target: |
135 lines (+13/-22) 4 files modified
charmhelpers/contrib/openstack/utils.py (+6/-9) charmhelpers/fetch/giturl.py (+0/-3) tests/contrib/openstack/test_openstack_utils.py (+5/-5) tests/fetch/test_giturl.py (+2/-5) |
||||
To merge this branch: | bzr merge lp:~corey.bryant/charm-helpers/git-1531612 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Liam Young (community) | Approve | ||
Review via email: mp+281994@code.launchpad.net |
To post a comment you must log in.
The deploy from source support in the OpenStack charms performs shallow git clones (e.g. git clone --depth 1) by default. This increases the speed of a git clone significantly. However, there is a side-effect of shallow clones when they are pip installed, in that it causes pip to list the package version as 0.0.0, when in actuality the package version may have been 11.0.0. The next time a pip installed package needs a minimum version of that package (e.g. let's say it needs >= 10.0.0), it'll see that 0.0.0 is installed and it'll install the latest package from pypi.
Non-shallow git clones enable pip to see the actual version and prevent this issue. The openstack- origin- git yaml should support an option to override the default depth of git clones on a per-repo basis.