Forums | Mahara Community

Support /
Which version of Mahara am I running?


anonymous profile picture
Account deleted
Posts: 22

10 February 2010, 6:21

Hi all. The above may sound like a silly question but let me explain a bit about how I came to be unsure...

Like Moodle, we update our Mahara install via Git, using the following:

git pull git://gitorious.org/mahara/mahara.git 1.2_STABLE

...which I believe will get the latest 1.2 stable release, however when I pulled this morning, expecting the 1.2.3 release, Mahara itself informs me I am running "1.2.0rc2dev". This appears to be an entry in the database, so initially I thought my db is not being updated.

I then downloaded the 1.2.3 tarball, unpacked and installed it, and it informs me that it is version "1.2.4testing", which (maybe just for me) is a little confusing as I was expecting t to say 1.2.3!

So, is there a definitive way of telling exactly which version of Mahara I'm running?

Paul.

PS.  git log tells me the last commit was 21ac8e28 on Tue Feb 9 12:54:42: "List files to ignore when exporting tarballs from git" so it seems pretty up to date....

anonymous profile picture
Account deleted
Posts: 808

11 February 2010, 17:52

Hi Paul,

You can always find out which version you are running by looking in htdocs/lib/version.php.

For example, the current version on the master (development) branch is found at

 http://gitorious.org/mahara/mahara/blobs/master/htdocs/lib/version.php

and the current 1.2 stable version is here:

 http://gitorious.org/mahara/mahara/blobs/1.2_STABLE/htdocs/lib/version.php

There is also a version number in your database (in the config table).  This should be the same as the one in htdocs/lib/version.php except during the hopefully very short space of time after you have just installed new code before you have run the upgrade script.

anonymous profile picture
Account deleted
Posts: 22

17 February 2010, 6:52

Hi Richard, thanks for the reply and sorry for the delay in getting back to you.

After 'git pulling' the 1.2_STABLE branch this morning and checking lib/version.php, I have:

$config->version = 2009111011;
$config->release = '1.2.4testing';

...but in the database, I have: 

version 2009111201
release 1.2.0rc2dev

...which are obviously not the same. I've accessed admin/upgrade.php and it says nothing needs upgrading.

Nothing is actually wrong, everything works as I believe it should, I'm just a little concerned that even though the code is up-to-date, it's not upgrading for some reason.  I'll try re-installing my local copy of the 1.2_STABLE branchto see if that makes any difference.

Cheers,

Paul.

anonymous profile picture
Account deleted
Posts: 808

17 February 2010, 16:53

It does sound wrong -- I think you must have pulled and upgraded from a different branch (master?) at some stage.  A 'rogue' upgrade has left your database at number 2009111201, but all the upgrades on 1.2_STABLE have numbers less than that (once that branch went 'stable', all upgrades are 20091110xx).

So Mahara thinks you've gone past all the latest db upgrades on the stable branch and won't apply them ... but there are only two core upgrades you might have missed by the look of it (in htdocs/lib/db/upgrade.php).

It's generally a bad idea to have the code and db versions out of line, so you might want to clean up your database manually. There really is no easy way to do this -- you need to read the php files on both branches, find the upgrades you have that you shouldn't have (most likely 2009111200 and 2009111201 from master), and the upgrades you may have missed out on from 1.2_STABLE (possibly 2009111004 and 2009111009, but you may also be up to date because we don't know where you were when you ran the upgrade).

In your case I'd say you're lucky, it looks pretty simple, you just undo 2009111200 and 2009111201 (from the php file you can see this involves dropping the mailssent and mailsbounced columns from the artefact_internal_profile_email table).

Both the ones you should have but may not have (2009111004 and 2009111009) look safe to run twice anyway, so you can just set your version number (in the config table) back to say 2009111003 and hit the upgrade page.

anonymous profile picture
Account deleted
Posts: 22

23 February 2010, 6:54

Richard, thanks so much. I must have done as you say, pulled from the dev branch instead of stable at some point. To be honest it's likely as I'm a relative git n00b and probably did something daft and further compounded the issue unbotching it....

We have a scheduled maintenance window next week so I'll do as you suggest then.

Thanks again,

Paul.

anonymous profile picture
Account deleted
Posts: 22

02 March 2010, 4:19

Thanks for your help Richard, I've tinkered with the db and upgraded, everything seems to be working as it should.

17 February 2010, 17:41

Dear Paul,

As you are doing I am updating my Moodle server as stated on the wiki with CVS. And it works fine. I would like to do the same way with Maharaand Git.

I tried the following command :

    git clone git://git.mahara.org/git/mahara.gitB
But I have two problems :
  1. How I can install Mahara via Git directly in my server folder (/var/www/mahara)
  2. How do i update it regularely

Maybe we could adapt the wiki with a complete procedure ?

Thanks for your help about that.

-dajan

 

 

anonymous profile picture
Account deleted
Posts: 22

23 February 2010, 9:02

Hi Domimique-Alain. There are probably a few people here better experienced to answer your question, howevewr I'll give it a go. :)

FWIW, you do know that the Mahara git repository has changed location, so your git clone line would now read:

git clone git://gitorious.org/mahara/mahara.git

1. You could always move the contents of the htdocs/ folder within the mahara/ folder to /var/www/  but this would mess up your repository.

What we do is clone the mahara repository at /srv/mahara/ and modify /etc/apache2/sites-enabled/000-default to look in the htdocs/ folder. (This assumes Mahara is the only thing running on your server.)

I hope that makes sense. If you ask me to clarify I may not be able to!

2. Once you have successfully 'git clone'd, you should be able to do a 'git pull' in the same way, although I add the branch name to the end, as follows:

git pull git://gitorious.org/mahara/mahara.git 1.2_STABLE

or for Moodle:

git pull git://git.moodle.org/moodle.git MOODLE_1.9_STABLE

I hope that helps.

Regards,

Paul.

François Marier's profile picture
Posts: 411

23 February 2010, 17:58

Here's what I would do (building on Paul's response).

 In a directory somewhere else than /var/www/, for example in /home/username/mahara:

git clone git://gitorious.org/mahara/mahara.git

cd mahara

git checkout -t origin/1.2_STABLE

cd /var/www

ln -s /home/username/mahara/htdocs mahara

Then all you need to do to update Mahara is to go into /home/username/mahara and run:

 git pull

23 February 2010, 18:41

Thank you all,

I will try that tomorrow or before the end of this week.

Keep you posted.

-dajan

10 results