Merge branch 'master' of github.com:yahoo/Openstack-DevstackPy

This commit is contained in:
Joshua Harlow 2012-02-07 15:44:49 -08:00
commit b373c3a225
4 changed files with 12 additions and 4 deletions

View File

@ -9,7 +9,8 @@
},
#the base is 2.0, need to upgrade
"pycrypto": {
"version": "2.5"
"version": "2.5",
"options": "--upgrade"
},
#the newest we can get is 1.3.3 from epel/rhel
#this causes issues like the following

View File

@ -39,10 +39,16 @@ def install(pips, distro):
pipfull = name
pipinfo = pips.get(name)
if pipinfo and pipinfo.get('version'):
version = str(pipinfo.get('version'))
# Move str after the test since str(None) is 'None'
version = pipinfo.get('version')
if version:
pipfull = pipfull + "==" + version
pipfull = pipfull + "==" + str(version)
actions.append(pipfull)
# Move str after the test since str(None) is 'None'
options = pipinfo.get('options')
if options:
LOG.info("Using pip options:%s" % (options))
actions.append(str(options))
if actions:
LOG.info("Installing python packages [%s]" % (", ".join(actions)))
root_cmd = PIP_CMD_NAMES.get(distro, 'pip')

View File

@ -323,7 +323,7 @@ def symlink(source, link, force=True, run_as_root=True):
LOG.debug("Creating symlink from %s => %s" % (link, source))
path = dirname(link)
mkdirslist(path)
if force and exists(link):
if force and (exists(link) or islink(link)):
unlink(link, True)
os.symlink(source, link)

View File

@ -157,6 +157,7 @@ def load_local_rc(fn=None, cfg=None):
am_set += 1
return am_set
def main():
opts = optparse.OptionParser()
opts.add_option("-o", "--output", dest="filename",