Script
[root@kcw scripts]# cat setup_tg2 
#!/bin/bash
#
#   ConVirt   -  Copyright (c) 2008 Convirture Corp.
#   ======
#
# ConVirt is a Virtualization management tool with a graphical user
# interface that allows for performing the standard set of VM operations
# (start, stop, pause, kill, shutdown, reboot, snapshot, etc...). It
# also attempts to simplify various aspects of VM lifecycle management.
#
#
# This software is subject to the GNU General Public License, Version 2 
(GPLv2)
# and for details, please consult it at:
#
#    http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
# 
#
# author : Jd <[email protected]>
#

prg_name=`readlink -f $0`
base=`dirname $prg_name`
if [ "${base}" == "" ]; then
    base="."
fi
common_scripts=${base}/../../../common/scripts
common_install_scripts=${base}/../common

source $common_scripts/functions
source $common_install_scripts/functions

# detect distro
detect_distro

if [ "$?" != "0" ]; then
   echo "Error detecting Linux distribution.Exiting."
   exit 1
fi

# dump information
echo "DISTRO ${DIST}"
echo "VER ${VER}"
echo "CODENAME ${CODE_NAME}"
echo "KERNEL ${KERNEL}"
echo "ARCH ${ARCH}"

#include the distro specific file if it exists.
distro_functions=$common_scripts/${DIST}_functions
if [ -r $distro_functions ]; then
    echo "Info: Sourcing $distro_functions"
    source $distro_functions
else
   echo "Info: $distro_functions not found."
fi

#include the distro specific file if it exists.
distro_install_functions=$common_install_scripts/${DIST}_functions
if [ -r $distro_install_functions ]; then
    echo "Info: Sourcing $distro_install_functions"
    source $distro_install_functions
else
   echo "Info: $distro_install_functions not found."
fi

source $base/install_config

# TBD: add some command line parsing.. and checks

create_tg2env
if [ "$?" != "0" ]; then
   echo "ERROR: Failed creating Turbogears2 environment."
   exit 1
else
   echo "TurboGears environmnet setup successfully."
fi


在 2015年1月23日星期五 UTC+8下午9:36:20,Moritz Schlarb写道:
>
> Hello, 
>
> could you please give us additional information like what does the 
> setup_tg2 script do? 
>
> Regards, 
> Moritz 
>
> On 23.01.2015 04:59, 康长伟 wrote: 
> > 错误如下: 
> > | 
> > [root@kvm003 scripts]# ./setup_tg2    #到这一步报错,其他没错 
> > install common functions sourced. 
> > DISTRO RedHat 
> > VER 6.6 
> > CODENAME Final 
> > KERNEL 2.6.32-504.el6.x86_64 
> > ARCH x86_64 
> > Info: Sourcing 
> > 
> /root/convirt-install/install/cms/scripts/../../../common/scripts/RedHat_functions
>  
>
> > Info: Sourcing 
> > /root/convirt-install/install/cms/scripts/../common/RedHat_functions 
> > New python executable in /root/convirt/tg2env/bin/python 
> > Installing setuptools, pip...done. 
> > 
> /root/convirt/tg2env/lib/python2.6/site-packages/pkg_resources/__init__.py:2462:
>  
>
> > PEP440Warning: 'PEAK-Rules (0.5a1.dev-r2582)' is being parsed as a 
> > legacy, non PEP 440, version. You may find odd behavior and sort order. 
> > In particular it will be sorted as less than 0.0. It is recommend to 
> > migrate to PEP 440 compatible versions. 
> >   PEP440Warning, 
> > Searching for extremes 
> > Best match: Extremes 1.1.1 
> > Processing Extremes-1.1.1-py2.6.egg 
> > Extremes 1.1.1 is already the active version in easy-install.pth 
> > 
> > Using 
> > 
> /root/convirt/tg2env/lib/python2.6/site-packages/Extremes-1.1.1-py2.6.egg 
> > Processing dependencies for extremes 
> > Finished processing dependencies for extremes 
> > 
> /root/convirt/tg2env/lib/python2.6/site-packages/pkg_resources/__init__.py:2462:
>  
>
> > PEP440Warning: 'PEAK-Rules (0.5a1.dev-r2582)' is being parsed as a 
> > legacy, non PEP 440, version. You may find odd behavior and sort order. 
> > In particular it will be sorted as less than 0.0. It is recommend to 
> > migrate to PEP 440 compatible versions. 
> >   PEP440Warning, 
> > Searching for mysql-python 
> > Best match: MySQL-python 1.2.5 
> > Processing MySQL_python-1.2.5-py2.6-linux-x86_64.egg 
> > MySQL-python 1.2.5 is already the active version in easy-install.pth 
> > 
> > Using 
> > 
> /root/convirt/tg2env/lib/python2.6/site-packages/MySQL_python-1.2.5-py2.6-linux-x86_64.egg
>  
>
> > Processing dependencies for mysql-python 
> > Finished processing dependencies for mysql-python 
> > 
> /root/convirt/tg2env/lib/python2.6/site-packages/pkg_resources/__init__.py:2462:
>  
>
> > PEP440Warning: 'PEAK-Rules (0.5a1.dev-r2582)' is being parsed as a 
> > legacy, non PEP 440, version. You may find odd behavior and sort order. 
> > In particular it will be sorted as less than 0.0. It is recommend to 
> > migrate to PEP 440 compatible versions. 
> >   PEP440Warning, 
> > Searching for tg.devtools 
> > Best match: tg.devtools 2.0.2 
> > Processing tg.devtools-2.0.2-py2.6.egg 
> > tg.devtools 2.0.2 is already the active version in easy-install.pth 
> > 
> > Using 
> > 
> /root/convirt/tg2env/lib/python2.6/site-packages/tg.devtools-2.0.2-py2.6.egg 
>
> > Processing dependencies for tg.devtools 
> > Traceback (most recent call last): 
> >   File "/root/convirt/tg2env/bin/easy_install", line 11, in <module> 
> >     sys.exit(main()) 
> >   File 
> > 
> "/root/convirt/tg2env/lib/python2.6/site-packages/setuptools/command/easy_install.py",
>  
>
> > line 2142, in main 
> >     distclass=DistributionWithoutHelpCommands, **kw 
> >   File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup 
> >     dist.run_commands() 
> >   File "/usr/lib64/python2.6/distutils/dist.py", line 975, in 
> run_commands 
> >     self.run_command(cmd) 
> >   File "/usr/lib64/python2.6/distutils/dist.py", line 995, in 
> run_command 
> >     cmd_obj.run() 
> >   File 
> > 
> "/root/convirt/tg2env/lib/python2.6/site-packages/setuptools/command/easy_install.py",
>  
>
> > line 376, in run 
> >     self.easy_install(spec, not self.no_deps) 
> >   File 
> > 
> "/root/convirt/tg2env/lib/python2.6/site-packages/setuptools/command/easy_install.py",
>  
>
> > line 619, in easy_install 
> >     return self.install_item(spec, dist.location, tmpdir, deps) 
> >   File 
> > 
> "/root/convirt/tg2env/lib/python2.6/site-packages/setuptools/command/easy_install.py",
>  
>
> > line 654, in install_item 
> >     self.process_distribution(spec, dists[0], deps, "Using") 
> >   File 
> > 
> "/root/convirt/tg2env/lib/python2.6/site-packages/setuptools/command/easy_install.py",
>  
>
> > line 710, in process_distribution 
> >     % e.args 
> > TypeError: not enough arguments for format string 
> > ERROR: installing TG2 (2.0.3). 
> > ERROR: Failed creating Turbogears2 environment. 
> > 
> > | 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "TurboGears" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to [email protected] <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > To post to this group, send email to [email protected] 
> <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > Visit this group at http://groups.google.com/group/turbogears. 
> > For more options, visit https://groups.google.com/d/optout. 
>
> -- 
> Moritz Schlarb 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to