r92692 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92691‎ | r92692 | r92693 >
Date:21:49, 20 July 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Fixed r92660: output cache dir needs to be versioned
Modified paths:
  • /trunk/tools/mwmultiversion/scripts/l10nupdate (modified) (history)
  • /trunk/tools/mwmultiversion/scripts/mwversionsinuse (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/scripts/mwversionsinuse
@@ -1,8 +1,8 @@
22 #!/bin/sh
33 # Returns a space separated list of all active MW versions (e.g. "x.xx").
4 -# The versions are defined in /usr/local/apache/common-local/wmf-config/wikiversions.cdb.
5 -# If --dbonly is passed in, then each item in the list will be a DB name
6 -# for *some* wiki that uses that version instead of the version number.
 4+# Versions are defined in /usr/local/apache/common-local/wmf-config/wikiversions.cdb.
 5+# If --withdb is passed in, then each item in the list will be appended
 6+# with '=' followed by the DB name of *some* wiki that uses that version.
77 # This script belongs in /usr/bin/.
88 declare -a mwVersionsRes
99 declare -a mwVersionsNums
@@ -23,8 +23,8 @@
2424
2525 if [ $mwVersionInArray -eq 0 ]; then
2626 mwVersionsNums=("${mwVersionsNums[@]}" "$mwVersionNum")
27 - if [ "$1" -eq "--dbonly" ]; then
28 - mwVersionsRes=("${mwVersionsRes[@]}" "$mwDbName")
 27+ if [ "$1" -eq "--withdb" ]; then
 28+ mwVersionsRes=("${mwVersionsRes[@]}" "$mwVersionNum=$mwDbName")
2929 else
3030 mwVersionsRes=("${mwVersionsRes[@]}" "$mwVersionNum")
3131 fi
Index: trunk/tools/mwmultiversion/scripts/l10nupdate
@@ -15,25 +15,27 @@
1616 exit 1
1717 fi
1818
19 -mwDbNames=(`mwversionsinuse --dbonly`)
20 -if [ -z "$mwDbNames" ]; then
 19+mwVerDbSets=(`mwversionsinuse --withdb`)
 20+if [ -z "$mwVerDbSets" ]; then
2121 /home/wikipedia/bin/dologmsg "!log LocalisationUpdate failed"
2222 echo "FAILED"
2323 exit 1
2424 fi
2525
26 -for mwDb in "${mwDbNames[@]}"
 26+for i in "${mwVerDbSets[@]}"
2727 do
 28+ mwVerNum=${i%=*}
 29+ mwDbName=${i#*=}
2830 if mwscript extensions/LocalisationUpdate/update.php \
29 - --wiki="$mwDb" \
30 - --outdir=/home/wikipedia/common/php/cache/l10n \
 31+ --wiki="$mwDbName" \
 32+ --outdir=/home/wikipedia/common/php-"$mwVerNum"/cache/l10n \
3133 --all \
3234 --quiet
3335 then
3436 echo "Completed. Syncing to Apaches"
3537 /home/wikipedia/bin/sync-l10nupdate
3638 echo "Clearing message blobs"
37 - mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDb"
 39+ mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDbName"
3840 echo "All done"
3941 else
4042 /home/wikipedia/bin/dologmsg "!log LocalisationUpdate failed"

Sign-offs

UserFlagDate
Catropeinspected02:16, 21 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92660* Changed l10 update and sync scripts to run for each active MW version...aaron18:51, 20 July 2011

Comments

#Comment by Catrope (talk | contribs)   02:16, 21 July 2011

Looks good to me but I'm a bit out of my depth with the bash stuff here.

Status & tagging log