Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Initial Version and Version 1 of DownGrade


Ignore:
Timestamp:
07/31/06 21:58:36 (13 years ago)
Author:
jorge.vargas
Comment:

Adding instructions on how to move to older TG releases

Legend:

Unmodified
Added
Removed
Modified
  • DownGrade

    v1 v1  
     1So you want to uninstall Turbogears. this could be because of  
     2 
     3 1. you found a bug or "feature" and you must go back to an earlier version (or something broke on a live server after upgrading) 
     4 1. you install a SVN co and want to get back to a release version 
     5 1. you just got tired of us, which I hope never happens, if so rant on the mailing list, we'll fix/add/remove your problem if reasonable of course :) 
     6 
     7---- 
     8first of all let me say there is no easy_install command for uninstall, at least not yet... 
     9---- 
     10 
     11= 5 minutes tutorial on site-packages = 
     12go to your <pythonInstall>/lib/site-package dir 
     13 
     14Everything installed by setuptools, is either in easy-install.pth setuptools.pth or a .egg (dir or file) the rest (if any) is either plain disutils or stuff you put there manually. 
     15 
     16you will find either a folder or a file that ends in .egg, they are both packages, it only diference is that some packages are "zip safe" and others aren't which just means you can run them for a compress file or you need to uncompress it (to a folder). So from now on a .egg is whichever applies. 
     17 
     18Another thing to note is that old versions of all packages are not deleted, so if you have been using turbogears/setuptools for a while you will see many versions of the same package. it is safe to delete old versions, but don't delete the ones shown in easy-install.pth which we'll cover in a sec. 
     19 
     20open the file easy-install.pth in your favorite text editor, and you will see something like this. 
     21 
     22{{{ 
     23import sys; sys.__plen = len(sys.path) 
     24.\nose-0.8.7-py2.4.egg 
     25.\ruledispatch-0.5a0.dev_r2100-py2.4-win32.egg 
     26.\celementtree-1.0.5_20051216-py2.4-win32.egg 
     27.\elementtree-1.2.6-py2.4.egg 
     28.\sqlobject-0.7.1dev_r1457-py2.4.egg 
     29.\pyprotocols-1.0a0dev_r2082-py2.4-win32.egg 
     30.\cheetah-1.0-py2.4-win32.egg 
     31.\pastedeploy-0.4-py2.4.egg 
     32.\paste-0.4.1-py2.4.egg 
     33.\pysqlite-2.1.3-py2.4-win32.egg 
     34.\pastescript-0.5.1-py2.4.egg 
     35.\kid-0.9.1-py2.4.egg 
     36.\formencode-0.5.1-py2.4.egg 
     37.\configobj-4.3.1-py2.4.egg 
     38.\simplejson-1.3-py2.4.egg 
     39.\cherrypy-2.2.1-py2.4.egg 
     40.\turbokid-0.9.5-py2.4.egg 
     41.\turbojson-0.9.2-py2.4.egg 
     42.\turbocheetah-0.9.5-py2.4.egg 
     43.\setuptools-0.6b3-py2.4.egg 
     44.\turbogears-0.9a6-py2.4.egg 
     45<big line that ruins wiki formatting> 
     46}}} 
     47 
     48that is everything install by setuptools. (NOT only turbogears stuff). 
     49 
     50if you remove a package from this file, python won't find it even if the dir/file is there. so this is the actual list of packages installed not the content of site-packages. 
     51 
     52== first step Uninstalling current TG == 
     53the simpliest path is when the only thing you install with easy_install/setuptools, is Turbogears, then you just need to delete all .egg files/dirs and clean the easy-install.pth to look something like this. 
     54 
     55{{{ 
     56import sys; sys.__plen = len(sys.path) 
     57<big line that ruins wiki formatting> 
     58}}} 
     59 
     60if not (and running 0.9+) run ''tg-admin info'', and delete them one by one from easy-install.pth, you can leave the .egg's there if you later want to reinstall that version. 
     61 
     62if you have an older version that doesn't has ''tg-admin info'' you will have to look for the dependancies inside the egg file (<site-packages>/<turbogears>/EGG-INFO/requires.txt)  
     63 
     64== Installing new version == 
     65 
     66if you run the easy_install without params it will get you the lastest version (which is probably what you don't want) 
     67 
     68So you will have to specify the version via  
     69{{{ 
     70easy_install PackageName==1.2.3 
     71}}} 
     72 
     73Remenber you need to give the URL in most TG instalations or it will go directly to PyPI, where they only have the 0.8 branch.  
     74 
     75For example if we are at 0.9a8 and you want to go back to 0.9a6 (as of 7/31/06) 
     76 
     77On a Unix system you will have to run the following 
     78{{{ 
     79sudo easy_install -f http://www.turbogears.org/preview/download/index.html --script-dir /usr/local/bin TurboGears==0.9a6 
     80}}}  
     81just add ==<version> to the end of the "normal command" 
     82 
     83== What if the're no eggs for my version? == 
     84You will have to either upgrade your code or run from a svn co. 
     851. locate the revision number from http://trac.turbogears.org/turbogears/browser/tags 
     862. do a svn co or svn up to that revision number. 
     873. cd into that directory and run 
     88{{{ 
     89python setup.py develop 
     90}}} 
     91 
     92=== How to downGrade from SVN === 
     93go to your <pythonInstall>/lib/site-package dir. and look for a file call Turbogears.egg-link delete it. if you open it you will see a path to your svn co, whatever is there is what python will think as your "current turbogears install" 
     94 
     95== Moving between SVN revisions == 
     96just use svn, setuptools will follow you 
     97 
     98== how to uninstall SVN Turbogears == 
     99 
     100 1. delete Turbogears.egg-link. 
     101 1. your done :) 
     102 
     103