[LINUX] Dharma SVN build numbers
#1
Hi, first post here.

This question must have come up before but my Googling and forum searches did not provide any clues.

I'm using a daily cron job on my Ubuntu Lucid 10.04 machine to compile XBMC Dharma from SVN and install in /usr/share. I'd like to always have the latest version now that Dharma has been branched and is getting closer to its release date.

I noticed that the build number displayed in XBMC (System -> information) is always different, and lower, than the SVN version number. For example, my latest XBMC build is reported as r32453 in XBMC, while the svnversion command reports 32459.

Does anybody know the reason for this, and could it indicate a problem with my builds?
Reply
#2
32453 is the latest commit in the dharma branch, the other one is the latest commit on the repo.
Reply
#3
But should't the version numbers be identical if I compile from source, using SVN? Where does the repo come in?
Reply
#4
You need to do some reading up on how SVN works Wink

The Dharma folder in subversion has a latest revision of 32453. However, the entire repository has a HEAD revision of 32459. These are commit outside of Dharma code. You're seeing 32453 because it's the latest revision that made changes to Dharma. 32454-32459 just made changes in the repository that don't affect Dharma.
Reply
#5
Thanks a lot, all clear now! ..and apologies for not having done my homework by reading up on SVN first.

My build logs are named using the version number returned by running svnversion in /Dharma - this must be the head revision number.

I'm sure I can figure out a way to grab the latest revision number from /Dharma so that XBMC and SVN report the same build number.
Reply
#6
Hello Antipode,

would you consider sharing your script?
I have been compiling my own builds since a couple of weeks but I'd alway like to improve my skills.
At the moment I just enter all the commands one by one.... which works but I'm sure this could be improved ;-)

Thanks for your help!
Reply
#7
My revision numbers in xbmc after compile always end with M, is that normal ?
Reply
#8
Star 
Hi Smart79,

I have a dedicated user "buildd" for compiling and my local SVN copy for Dharma is in /home/buildd/Dharma.

The cron job (file /etc/cron.d/xbmc-build-install) starts at 2am and runs as user buildd:

Code:
0 2 * * * buildd echo "`date`: `/usr/local/bin/xbmc-build | tail -1`" >> /home/buildd/xbmc-make.log

The last line of the script xbmc-build is written to a summary log file in the user buildd's home directory.

My script to build xbmc (file /usr/local/bin/xbmc-build) is:

Code:
#!/bin/bash
# created: 14-Apr-10
# updated: 04-Aug-10
# author: Antipode

if [ $1 ]; then DIR=$1; else
DIR="/home/buildd/Dharma"; fi
if [ $2 ]; then FORCE=$2; else
FORCE=0; fi
PFX="/usr"

cd $DIR
echo "SVN path: $DIR"
echo -n "SVN update.. "
rev=$(svn --force up | tail -1)
echo $rev
rnr=${DIR##*/}-r`svnversion -c | sed 's/:/_/'`
log="`date +/home/buildd/$rnr-%Y%m%d_%H%M%S`-build.log"
echo "log file: $log"

if [ $FORCE -eq 1 ]; then rev="Updated to revision"; echo NOTE: performing FORCED compile; fi

if [ "`echo $rev | grep 'Updated to revision'`" ]; then

    echo -n "$rnr: cleaning.. "
    make --silent clean &>> $log
    if [ $? -eq 2  ]; then
        echo -n "configuring.. "
        ./configure --disable-debug --prefix=$PFX &>> $log
        echo -n "cleaning (2).. "
        make --silent clean &>> $log
    fi
    if [ $? -eq 0 ]; then echo OK; else echo FAILED; exit 1; fi

    echo -n "$rnr: bootstrapping.. "
    ./bootstrap &>> $log
    if [ $? -eq 0 ]; then echo OK; else echo FAILED; exit 1; fi

    echo -n "$rnr: configuring.. "
    ./configure --disable-debug --prefix=$PFX &>> $log
    if [ $? -eq 0 ]; then echo OK; else echo FAILED; exit 1; fi

    echo -n "$rnr: compiling.. "
    make -j2 --silent &>> $log
    if [ $? -eq 0 ]; then echo OK; else echo FAILED; exit 1; fi
    
    echo "$rnr: build successful"
else
    echo "$rnr: build skipped (SVN up to date)"; exit 1;
fi

This script creates a separate log file for each compile with a naming scheme that uses build number (now the latest commit in the Dharma branch - thanks folks!), date and time.

You can add your own lines to install after a succesful compile - just be a bit careful there.

Hope this helps.
Reply
#9
Hi Marvel,

I've seen M and MS on my past SVN builds from trunk, but not yet on Dharma builds.

See http://www.yolinux.com/TUTORIALS/Subversion.html:

The "svnversion" command will produce a compact version number for a working copy. Lists range of versions, adds "S" if switched, "M" modified.

As you can tell from the posts above I am no SVN guru and I'm not really sure what "switched" and "modified" mean.
Reply
#10
Antipode Wrote:Hi Marvel,

I've seen M and MS on my past SVN builds from trunk, but not yet on Dharma builds.

See http://www.yolinux.com/TUTORIALS/Subversion.html:

The "svnversion" command will produce a compact version number for a working copy. Lists range of versions, adds "S" if switched, "M" modified.

As you can tell from the posts above I am no SVN guru and I'm not really sure what "switched" and "modified" mean.

Thanks for the info, I'll be sure to have a read Big Grin
Reply
#11
I am a bit confused now Big Grin

I use this ppa: http://ppa.launchpad.net/team-xbmc-svn/ppa
But XBMC says its revision 32246? But you guys talk about 32459 Nerd

I thought that PPAs update automatically if a new version arrives? I think there is a big misunderstanding Big Grin
Reply
#12
Smile 
Hi Antipode,

thank you for the script. Looks quite sophisticated ;-)
I will try it out soon!

Best wishes...Smart
Reply
#13
sylvio2000 Wrote:I am a bit confused now Big Grin
...
I thought that PPAs update automatically if a new version arrives? I think there is a big misunderstanding Big Grin
Me too! A while ago I installed xbmc 10.08~svn32246-lucid1 using apt source:
Code:
deb http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu lucid main
...but there has been no updates never since. At the moment there are no Dharma's lucid packages available at all at PPA's. Please help me how do I get the daily builds back.

EDIT: Oh well, the answer was in sticky topics, sorry: http://forum.xbmc.org/showpost.php?p=580...tcount=890
Reply
#14
jms-xbmc Wrote:EDIT: Oh well, the answer was in sticky topics, sorry: http://forum.xbmc.org/showpost.php?p=580...tcount=890

just to make it complete: http://forum.xbmc.org/showpost.php?p=582...tcount=893

means: chances are we'll soon have updated builds available again in the SVN PPA Cool
OpenElec Standalone --> Asus Chromebox 'Panther' --> Onkyo TX-NR709 --> Sony 55" X85C Android TV (also with Kodi!)
Asus Chromebox EZ Script
Kodi on Sony Bravia Android TVs
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Dharma SVN build numbers0