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

Version 1 (modified by jorge.vargas, 13 years ago) (diff)

Adding instructions on how to move to older TG releases

So you want to uninstall Turbogears. this could be because of

  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)
  2. you install a SVN co and want to get back to a release version
  3. 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 :)

first of all let me say there is no easy_install command for uninstall, at least not yet...


5 minutes tutorial on site-packages

go to your <pythonInstall>/lib/site-package dir

Everything 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.

you 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.

Another 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.

open the file easy-install.pth in your favorite text editor, and you will see something like this.

import sys; sys.__plen = len(sys.path)
.\nose-0.8.7-py2.4.egg
.\ruledispatch-0.5a0.dev_r2100-py2.4-win32.egg
.\celementtree-1.0.5_20051216-py2.4-win32.egg
.\elementtree-1.2.6-py2.4.egg
.\sqlobject-0.7.1dev_r1457-py2.4.egg
.\pyprotocols-1.0a0dev_r2082-py2.4-win32.egg
.\cheetah-1.0-py2.4-win32.egg
.\pastedeploy-0.4-py2.4.egg
.\paste-0.4.1-py2.4.egg
.\pysqlite-2.1.3-py2.4-win32.egg
.\pastescript-0.5.1-py2.4.egg
.\kid-0.9.1-py2.4.egg
.\formencode-0.5.1-py2.4.egg
.\configobj-4.3.1-py2.4.egg
.\simplejson-1.3-py2.4.egg
.\cherrypy-2.2.1-py2.4.egg
.\turbokid-0.9.5-py2.4.egg
.\turbojson-0.9.2-py2.4.egg
.\turbocheetah-0.9.5-py2.4.egg
.\setuptools-0.6b3-py2.4.egg
.\turbogears-0.9a6-py2.4.egg
<big line that ruins wiki formatting>

that is everything install by setuptools. (NOT only turbogears stuff).

if 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.

first step Uninstalling current TG

the 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.

import sys; sys.__plen = len(sys.path)
<big line that ruins wiki formatting>

if 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.

if 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)

Installing new version

if you run the easy_install without params it will get you the lastest version (which is probably what you don't want)

So you will have to specify the version via

easy_install PackageName==1.2.3

Remenber 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.

For example if we are at 0.9a8 and you want to go back to 0.9a6 (as of 7/31/06)

On a Unix system you will have to run the following

sudo easy_install -f http://www.turbogears.org/preview/download/index.html --script-dir /usr/local/bin TurboGears==0.9a6

just add ==<version> to the end of the "normal command"

What if the're no eggs for my version?

You will have to either upgrade your code or run from a svn co.

  1. locate the revision number from http://trac.turbogears.org/turbogears/browser/tags
  2. do a svn co or svn up to that revision number.
  3. cd into that directory and run
    python setup.py develop
    

How to downGrade from SVN

go 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"

Moving between SVN revisions

just use svn, setuptools will follow you

how to uninstall SVN Turbogears

  1. delete Turbogears.egg-link.
  2. your done :)