본문 바로가기
Research/Linux

TRAC: plugin uninstall

by sunnyan 2009. 8. 24.
728x90

설치되어 있는 TRAC 이 0.10.5 였다. 근데... TracTicketDelete를 설치 했는데... 아래 경로에서 설치 했다.

 

[root@sw1 ~]# easy_install http://trac-hacks.org/svn/ticketdeleteplugin/0.11
Downloading http://trac-hacks.org/svn/ticketdeleteplugin/0.11
Doing subversion checkout from http://trac-hacks.org/svn/ticketdeleteplugin/0.11 to /tmp/easy_install-PqX3xN/0.11
Processing 0.11
Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-PqX3xN/0.11/egg-dist-tmp-y0pJqe
zip_safe flag not set; analyzing archive contents...
Adding TracTicketDelete 2.0 to easy-install.pth file

Installed /usr/lib/python2.5/site-packages/TracTicketDelete-2.0-py2.5.egg
Processing dependencies for TracTicketDelete==2.0
Finished processing dependencies for TracTicketDelete==2.0

위와 같이 설치를 한 후에, trac 페이지를 봤는데... 꿈쩍하지 않는다... admin 페이지에 가봐도 plugins 페이지에 가봐도...

trac.ini를 수정해봐도...

 

아무래도 0.11 이 맘에 걸려서 uninstall 후에 0.10 을 설치 해 보기로 했다...

 

근데... uninstall은 또 어케 하지

 

Uninstalling

easy_install or python setup.py does not have an uninstall feature. Hower, it is usually quite trivial to remove a globally installed egg and reference:

   1. Do easy_install -m [plugin name] to remove references from $PYTHONLIB/site-packages/easy-install.pth when the plugin installed by setuptools.
   2. Delete executables from /usr/bin, /usr/local/bin or C:\Python*Scripts. For search what executables are there, you may refer to [console-script] section of setup.py.
   3. Delete the .egg file or folder from where it is installed, usually inside $PYTHONLIB/site-packages/.
   4. Restart web server.

If you are uncertain about the location of the egg, here is a small tip to help locate an egg (or any package) - replace myplugin with whatever namespace the plugin uses (as used when enabling the plugin):

>>> import myplugin
>>> print myplugin.__file__
/opt/local/python24/lib/site-packages/myplugin-0.4.2-py2.4.egg/myplugin/__init__.pyc

 

쩝~ 그냥... .egg 파일을 찾아서 지우라는 얘긴가?

 

[root@sw1 ~]# easy_install -m /usr/lib/python2.5/site-packages/TracTicketDelete-2.0-py2.5.egg
Processing TracTicketDelete-2.0-py2.5.egg
Removing TracTicketDelete 2.0 from easy-install.pth file

Installed /usr/lib/python2.5/site-packages/TracTicketDelete-2.0-py2.5.egg

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("TracTicketDelete")  # latest installed version
    pkg_resources.require("TracTicketDelete==2.0")  # this exact version
    pkg_resources.require("TracTicketDelete>=2.0")  # this version or higher

Processing dependencies for TracTicketDelete==2.0
Finished processing dependencies for TracTicketDelete==2.0

 

어쨋든 egg 파일을 지우고 나서...

 

[root@sw1 ~]# easy_install http://trac-hacks.org/svn/ticketdeleteplugin/0.10
Downloading http://trac-hacks.org/svn/ticketdeleteplugin/0.10
Doing subversion checkout from http://trac-hacks.org/svn/ticketdeleteplugin/0.10 to /tmp/easy_install-kqA-e_/0.10
Processing 0.10
Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-kqA-e_/0.10/egg-dist-tmp-5yhaYx
zip_safe flag not set; analyzing archive contents...
Adding TracTicketDelete 1.1.4 to easy-install.pth file

Installed /usr/lib/python2.5/site-packages/TracTicketDelete-1.1.4-py2.5.egg
Processing dependencies for TracTicketDelete==1.1.4
Finished processing dependencies for TracTicketDelete==1.1.4

위와 같이 0.10버전을 설치했더니 제대로 동작된다...

 

 

 

 

 

728x90