[mythtv-users] Updating SVN?

Michael T. Dean mtdean at thirdcontact.com
Thu Nov 3 00:20:33 EST 2005


Grant Emsley wrote:

> I'm currently running the SVN version of mythtv.  I finally figured 
> out that to do SVN update you have to be in the directory it 
> downloaded the source to (silly) me.

See the SVN book:  http://svnbook.red-bean.com/

> So if I originally ran the "svn co ..." command in ~/mythsource, I 
> assume that to update I do this:
>
> cd ~/mythsource
> cd mythtv
> svn update
> ./configure
> make
> make install
>
> cd ../mythplugins
> svn update
> ./configure --enable-all
> make
> make install
>
> (and for myththemes too)
>
> Does that look right?  Also, do I need to stop 
> mythbackend/mythfrontend before doing "make install", or restart them 
> once everything is installed?

Shut down mythfrontend, then mtd, then mythbackend before doing make 
install.  Then--after installing both mythtv and mythplugins and 
myththemes--start mythbackend, then mtd, then mythfrontend (or, assuming 
you have your startup scripts working, just reboot).

Update all three projects through SVN before starting to compile so that 
you're sure you have the same rev of each.  It's not unusual for an 
update to go into mythplugins that causes compilation to fail with the 
previous rev of mythtv--and waiting the 40+ minutes during which you 
compile mythtv to update mythplugins is asking for trouble (and likely 
to result in more invalid tickets on Trac).

Also, if you're not closely following the commits list, you should 
really do a "make distclean" before configuring so that you don't have 
problems with things building against the wrong versions of files.  Or, 
you can do like I do and keep a "clean" working repository tar'ed up.  
Then, before compiling, recursively delete the contents of ~/mythsource, 
cd into (the now-empty) ~/mythsource and untar the repository.  Then, do 
your updates and create a tar of the new repository, and--since you've 
never compiled using the clean repository (it's clean because it was 
tar'ed right after you checked it out or updated it)--you don't need the 
make distclean.

Also, you need to do a qmake for each of the three pieces.

My recommendation for the update is below.  Notice that the commands log 
the updates so you can refer back to which files were modified since 
last build and easily see the rev you're attempting to build at the 
bottom of the log file.  They also record the date/time of the checkout 
for you.  That way, you have SVN rev easily available for questions to 
the list, and date/time available for your own curiosity (how long ago 
did I build Myth?).  If you don't have a clean repository at this point, 
run a make distclean in each project before doing the updates.:

cd ~/mythsource
cd mythtv &&
( svn update 2>&1 | tee ../mythtv-update.log && exit $PIPESTATUS ) &&
echo mythtv: `date` > ../srcdates &&
cd ../mythplugins &&
( svn update 2>&1 | tee ../mythplugins-update.log && exit $PIPESTATUS ) &&
echo mythplugins: `date` >> ../srcdates &&
cd ../myththemes &&
( svn update 2>&1 | tee ../myththemes-update.log && exit $PIPESTATUS ) &&
echo myththemes: `date` >> ../srcdates &&
cd .. &&
tar cjf ../myth-`date +'%Y%m%d'`.tar.bz2 *

Then, compile each with ./configure, qmake, make, make install.  See 
http://mythtv.org/docs/mythtv-HOWTO-5.html#ss5.4 .  I recommend logging 
your build, too.  Make sure you have a valid QTDIR environment variable 
and that the QT bin directory is in your path.  Then, do your 
logged-build with something like:

( ./configure [appropriate options] 2>&1 | tee cflog && exit $PIPESTATUS 
) &&
( qmake mythtv.pro 2>&1 | tee qmklog && exit $PIPESTATUS ) &&
make 2>&1 | tee mklog
# As root--after shutting down everything as instructed above
make install 2>&1 | tee mkinstlog

Then, take care of other stuff--setuid for mythfrontend, copying 
contributed scripts to bin directories, setting ownership of 
just-installed files (such as those in /usr/local/share/mythtv), 
configure dynamic linker with ldconfig, etc.

Mike


More information about the mythtv-users mailing list