Installation | Topics | Beyond Lino

Update a Lino site after dist-upgrade

After a dist-upgrade, the following procedure may help to upgrade the Python environment.

On a demo server

On a demo server there is a Python environment named master and the path to this environment is /usr/local/lino/shared/env/master.

  1. Deactivate the environment and change directory into the environment’s parent directory:

    $ deactivate
    $ cd /usr/local/lino/shared/env
    
  2. Rename the old environment and create a new one of same name:

    $ mv master master1
    $ python -m venv master
    
  3. Move the pull.sh and repositories from old to new env:

    $ mv master1/bin/pull.sh master/bin/pull.sh
    $ mv master1/repositories master/
    
  4. Activate the new environment:

    $ source master/bin/activate
    
  5. Run the pull script:

    $ pull.sh
    

On a production server

Reinstall the master venv with getlino:

sudo su
deactivate
cd /usr/local/lino/shared/env
mv pilv pilv1
python3 -m venv pilv
. pilv/bin/activate
pip install getlino

On each production site

mv env env1
getlino startsite XXX yyy
pip install atelier  # still needed
Okay to reinstall cosi to /usr/local/lino/lino_local/abservices? [y or n] Yes

Troubleshooting

Note down the current python version of the environment:

$ cat master/pyvenv.cfg

The output should look something similar to the following below:

home = /usr/local/lino/shared/env/master/bin
include-system-site-packages = true
version = 3.8.3

Take a note of the major and minor part of the version number (in our case: 3.8)