Command-line updater not detecting core & local upgrades

Bug #1401313 reported by Aaron Wells on 2014-12-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Aaron Wells
1.10
High
Aaron Wells
15.04
High
Aaron Wells

Bug Description

The command-line upgrade script (admin/cli/upgrade.php) now detects whether there are upgrades to run by examining the "toupgradecount" value returned from check_upgrades(). But core and local don't increment that value, only plugins do. Consequently, the CLI upgrader only runs upgrades if there are plugin upgrades waiting also.

Aaron Wells (u-aaronw) wrote :

This probably affects 1.10 as well, and probably not 1.9, but I'll have to check. It is caused by the code changes we made to the upgrade system in order to support the list of "plugins to upgrade" on the admin home page.

tags: added: cli upgrades
Aaron Wells (u-aaronw) wrote :

Testing this requires simulating an upgrade by manually changing your version.php files:

1. Bump the version number in htdocs/lib/version.php, or in htdocs/local/version.php
2. Run the command-line upgrade script

Expected result: The script should show Mahara being upgraded
Actual result: The script says "nothing to upgrade"

tags: added: local
Aaron Wells (u-aaronw) wrote :

Verified that the problem occurs in Mahara 1.10 as well, but not in Mahara 1.9 and earlier.

Reviewed: https://reviews.mahara.org/4077
Committed: http://gitorious.org/mahara/mahara/commit/636c5ad281e077f3250f461bc3bd39b796cfa09b
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 636c5ad281e077f3250f461bc3bd39b796cfa09b
Author: Aaron Wells <email address hidden>
Date: Thu Dec 11 12:30:37 2014 +1300

Count "core" and "local" in the "toupgradecount" for check_upgrades()

Bug 1401313: The "toupgradecount" was only counting plugins, not core
and local. This specifically caused problems for the command-line upgrade
script.

Change-Id: Ia7b666af890d84613ed34f0c72f395c77fdad358

Reviewed: https://reviews.mahara.org/4081
Committed: http://gitorious.org/mahara/mahara/commit/67e1d44504df69054209fb7aa0f62e8fc942645c
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit 67e1d44504df69054209fb7aa0f62e8fc942645c
Author: Aaron Wells <email address hidden>
Date: Thu Dec 11 12:30:37 2014 +1300

Count "core" and "local" in the "toupgradecount" for check_upgrades()

Bug 1401313: The "toupgradecount" was only counting plugins, not core
and local. This specifically caused problems for the command-line upgrade
script.

Change-Id: Ia7b666af890d84613ed34f0c72f395c77fdad358

Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers