Last Comment Bug 800329 - multiple locales don't build properly on win32, empty values break
: multiple locales don't build properly on win32, empty values break
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: NSIS Installer (show other bugs)
: 17 Branch
: All All
: -- normal (vote)
: mozilla19
Assigned To: Axel Hecht [:Pike]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-11 05:47 PDT by Ben Hearsum (:bhearsum)
Modified: 2012-11-19 10:03 PST (History)
11 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+
fixed
+
fixed


Attachments
check for value before checking its contents (604 bytes, patch)
2012-10-11 06:13 PDT, Axel Hecht [:Pike]
ted: review+
lukasblakk+bugs: approval‑mozilla‑aurora+
lukasblakk+bugs: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Ben Hearsum (:bhearsum) 2012-10-11 05:47:16 PDT
We got the following error when trying to build it:
Traceback (most recent call last):
  File "e:/builds/moz2_slave/rel-m-beta-w32-rpk-4/mozilla-beta/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py", line 321, in <module>
    preprocess_locale_files(config_dir, l10n_dirs)
  File "e:/builds/moz2_slave/rel-m-beta-w32-rpk-4/mozilla-beta/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py", line 110, in preprocess_locale_files
    True)
  File "e:/builds/moz2_slave/rel-m-beta-w32-rpk-4/mozilla-beta/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py", line 48, in get_locale_strings
    if value[-1] == "\"" and value[0] == "\"":
IndexError: string index out of range
make[2]: *** [l10ngen/setup.exe] Error 1
make[1]: *** [repackage-win32-installer] Error 2
make: *** [repackage-win32-installer-km] Error 2
Comment 1 Axel Hecht [:Pike] 2012-10-11 06:09:03 PDT
ok, this happens when a value is empty. This will affect more than just one locale, I assume (at least hy-AM is on my list of candidates, too).

I suggest we patch this in preprocess-locale.py, and make that bullet-proof.
Comment 2 Axel Hecht [:Pike] 2012-10-11 06:13:52 PDT
Created attachment 670370 [details] [diff] [review]
check for value before checking its contents

This patch applies to mozilla-beta, we should back-port it to aurora and central.

Taking ted as reviewer, as he's reviewing code there before.
Comment 3 Axel Hecht [:Pike] 2012-10-11 07:09:10 PDT
PS: This has been the case since the initial port of preprocess-locale from perl to python, but only recently got triggered by some locales having empty strings in the installer .properties files.

Notably, that's in narro exports, AFAICT.

Either way, we should make the python script bullet proof, IMHO.
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-10-13 05:50:33 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/057589f16a3a
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-10-13 16:41:49 PDT
https://hg.mozilla.org/mozilla-central/rev/057589f16a3a
Comment 6 Lukas Blakk [:lsblakk] use ?needinfo 2012-10-15 08:58:52 PDT
Comment on attachment 670370 [details] [diff] [review]
check for value before checking its contents

[Triage Comment]
We need this on Beta and Aurora too - Axel's away can someone check this in today please so it's in tomorrow's Beta build?
Comment 7 :Ms2ger (⌚ UTC+1/+2) 2012-10-16 08:07:03 PDT
https://hg.mozilla.org/releases/mozilla-beta/rev/c9f397f91cce
Comment 8 :Ms2ger (⌚ UTC+1/+2) 2012-10-16 08:07:47 PDT
(Still c-n for aurora)
Comment 9 Ryan VanderMeulen [:RyanVM] 2012-10-16 17:47:51 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/1796bbed0299

Note You need to log in before you can comment on or make changes to this bug.