Last Comment Bug 659379 - Localized files not ordered in l10n omnijars
: Localized files not ordered in l10n omnijars
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Michael Wu [:mwu]
:
: Gregory Szorc [:gps]
Mentors:
Depends on: 663737
Blocks: 1195331
  Show dependency treegraph
 
Reported: 2011-05-24 10:44 PDT by Michael Wu [:mwu]
Modified: 2015-08-17 07:58 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use per-locale jarlog directories (3.45 KB, patch)
2011-05-25 09:17 PDT, Michael Wu [:mwu]
ted: review+
Details | Diff | Splinter Review

Description Michael Wu [:mwu] 2011-05-24 10:44:13 PDT
As Pike mentioned in bug 641614, we can't do s/en-US/$(AB_CD)/ since we don't unpack between repacks.
Comment 1 Michael Wu [:mwu] 2011-05-25 09:17:50 PDT
Created attachment 535090 [details] [diff] [review]
Use per-locale jarlog directories

This patch stores jarlogs in their own locale specific directories to ensure we can always s/en-US/$(AB_CD)/. I added a JARLOG_DIR_AB_CD but it's not needed anymore and can be replaced with $(JARLOG_DIR)/$(AB_CD) if that's preferred.
Comment 2 Ted Mielczarek [:ted.mielczarek] 2011-06-08 09:56:46 PDT
Comment on attachment 535090 [details] [diff] [review]
Use per-locale jarlog directories

Review of attachment 535090 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with one important change.

::: client.mk
@@ -211,4 @@
>  profiledbuild::
>  	$(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_GENERATE=1
>  	$(MAKE) -C $(PGO_OBJDIR) package
> -	OBJDIR=${PGO_OBJDIR} $(PROFILE_GEN_SCRIPT)

Please don't change this, it's possible for people to use alternative profile generation scripts.

::: toolkit/locales/l10n.mk
@@ +139,5 @@
>  repackage-zip: UNPACKAGE="$(ZIP_IN)"
>  repackage-zip:  libs-$(AB_CD)
>  # Adjust jar logs with the new locale (can't use sed -i because of bug 373784)
> +	mkdir -p $(JARLOG_DIR_AB_CD)
> +	-cp -r $(JARLOG_DIR)/en-US/*.jar.log $(JARLOG_DIR_AB_CD)

We don't usually use mkdir / cp directly in Makefiles, but I'm not sure if it matters here. There's nothing non-portable in these two lines, is there?
Comment 3 Axel Hecht [:Pike] 2011-06-08 10:16:42 PDT
I thought that mkdir -p is not portable, but that's really just dark ages under tons of dust.
Comment 4 Michael Wu [:mwu] 2011-06-10 17:12:54 PDT
(In reply to comment #2)
> ::: toolkit/locales/l10n.mk
> @@ +139,5 @@
> >  repackage-zip: UNPACKAGE="$(ZIP_IN)"
> >  repackage-zip:  libs-$(AB_CD)
> >  # Adjust jar logs with the new locale (can't use sed -i because of bug 373784)
> > +	mkdir -p $(JARLOG_DIR_AB_CD)
> > +	-cp -r $(JARLOG_DIR)/en-US/*.jar.log $(JARLOG_DIR_AB_CD)
> 
> We don't usually use mkdir / cp directly in Makefiles, but I'm not sure if
> it matters here. There's nothing non-portable in these two lines, is there?

Just checked and mkdir -p and cp -r appear to be part of posix. Works on tier 1 platforms I know of, at least. Though, it appears that -R is preferred over -r on OSX.
Comment 5 Michael Wu [:mwu] 2011-06-10 17:57:17 PDT
http://hg.mozilla.org/mozilla-central/rev/dc8d154f3710

Used the wrong number though. Bug 641614 instead of this one.

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