https://bugzilla.wikimedia.org/show_bug.cgi?id=50347

--- Comment #1 from Ori Livneh <o...@wikimedia.org> ---
A further consequence of the misplaced confidence in 'set -e' is that scap will
sync an empty l10n file if mergeMessageFileList.php fails for whatever reason.

The problem is in lines 42-46 of mw-update-l10n:

  mwTempDest=$(sudo -u apache mktemp)
  sudo -u apache $BINDIR/mwscript mergeMessageFileList.php --wiki="$mwDbName" \
    --list-file=$MW_COMMON_SOURCE/wmf-config/extension-list $QUIET
--output="$mwTempDest"
  sudo -u apache chmod 664 "$mwTempDest"
  cp "$mwTempDest"
$MW_COMMON_SOURCE/wmf-config/ExtensionMessages-"$mwVerNum".php

An empty file is created by 'mktemp'. Because we're executing in a subshell, if
mergeMessageFileList.php fails, the script continues to execute, and control
eventually flows to 'cp' on line 46, which copies the temp file to
ExtensionMessages-X.XXwmfX.php. The empty message file is then synced.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to