We were running 1.7.2, and are upgrading to 1.9.3-1. We install from git
(because we have some local mods to apply, which we've found easier to do
when installing via git), which means that we run .../hacking/env-setup,
and that seems to have changed between 1.7.2 and 1.9.3-1, in ways that
don't work for us. This bit in particular:
gen_egg_info()
{
if [ -e "$PREFIX_PYTHONPATH/ansible.egg-info" ] ; then
rm -r "$PREFIX_PYTHONPATH/ansible.egg-info"
fi
python setup.py egg_info
}
We sometimes run Ansible as root, and sometimes as ourselves, depending on
what we're doing; $PREFIX_PYTHONPATH is owned by root. If we only ever run
it as ourselves, it fails to create ansible.egg-info, which is fine -- we
run env-setup with '-q' so we never even see the error -- but if we ever
run it as root, then it creates the directory, and subsequent non-root
runs after *that* just hang, because 'rm -r' prompts us interactively if
we want to descend into a write-protected directory:
+$ rm -r ansible.egg-info
rm: descend into write-protected directory `ansible.egg-info'?
In our particular case, we don't think we care if pkg_resources knows
about our off-in-a-corner-somewhere Ansible installation, and this would
work fine for us if the 'rm -r' were an 'rm -rf' instead. (It'd fail, and
we wouldn't ever know or care.)
Alternatively: Does this actually need to be done every time you run
.../hacking/env-setup? If it's more like a one-time thing that you only
ever have to do when you pull from git, maybe it should be handled by a
separate setup/install/something script?
If the 'rm -rf' approach sounds good, I can put in a PR.
-Josh (jbs@care.com)
This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.