[mythtv-users] Easy way to switch between 0.27 / 0.28 FE only

Stuart Auchterlonie stuarta at squashedfrog.net
Tue Oct 27 17:00:23 UTC 2015


On 27/10/15 10:39, Mark wrote:
> Is there an easy way to switch between (back and forthand back
> again)0.27 and 0.28 on a single(Mythbuntu or Ubuntu)frontend?
> 
> I am test building a 0.28 backend but it only has basic graphics and I’m
> running it in a virtual machine so it doesn’t handlebeing a frontend
> well. When I’m testing I think I would like to grab one of the unused
> 0.27 main frontends, toggle it to 0.28, point it to the test serverand
> test a bit of livetv,and thentoggle it back to 0.27and point it back to
> the main BEfor the next person who sits down.
> 
> I’m not sure whether it can be done though, without risk of the0.28
> dependencies conflicting with the 0.27dependencies?
> 

Yes it can be done, and is relatively straightforward. I do this so
I can switch between versions to test and code against each one.

What i do is to compile them with different prefixes. ie

fixes/0.27:
--prefix=/usr/local/myth-0.27
and for convenience of my wrapper scripts (more on these in a bit)
I symlink /usr/local/myth-prod -> /usr/local/myth-0.27

master:
--prefix=/usr/local/myth-git

Then build each one in turn and install it

Then I have wrapper scripts which I stick in /usr/local/bin
and name appropriately: mythbackend-prod, mythbackend-git etc

They are all basically the same

Example: /usr/local/bin/mythbackend-prod
--------
#!/bin/sh

PATH=/usr/local/myth-prod/bin:$PATH
LD_LIBRARY_PATH=/usr/local/myth-prod/lib:$LD_LIBRARY_PATH
MYTHCONFDIR=$HOME/.mythtv-prod/
PYTHONPATH=/usr/local/myth-prod/lib/python2.7/site-packages

export PATH LD_LIBRARY_PATH MYTHCONFDIR PYTHONPATH

exec /usr/local/myth-prod/bin/mythbackend $@
--------

Some key items to note

PATH obvious, where to find the binaries

LD_LIBRARY_PATH as per PATH, where to find the libraries

MYTHCONFDIR moves where the config files (normally in ~/.mythtv)
live. Different versions, use different databases which means
different config files!

PYTHONPATH, like PATH means the python bits we install will be
found. This allows things like the metadata grabbers to work

On the database side, I have 2 different databases named
mythprod and mythdev. I on purpose do not use mythconverg,
so that I can be explicit about which database to use, and
anything being stupid and just using mythconverg will be caught.

I run both a prod (fixes/0.27) and dev (master) backend on the
same server. For tuners I have 1 dual DVB-T and 1 dual DVB-S2,
so i split each tuner, and use 1 of each type of input for
prod and dev (so they have identical tuner setups)

My frontends use exactly the same setup, with the same scripts
(literally just change mythbackend to mythfrontend in the script)


I hope that explains it nicely. Let me know if you have questions.


Cheers
Stuart Auchterlonie



More information about the mythtv-users mailing list