Closed Bug 252941 Opened 21 years ago Closed 20 years ago

Don't pull all locales

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: benjamin)

Details

(Keywords: fixed-aviary1.0, Whiteboard: [have patch] - reopened, additional patch needs review bryner)

Attachments

(4 files, 1 obsolete file)

We're gonna have many locales in the CVS tree under toolkit/locales and browser/locales and at 750k+ per locale, that adds up quickly. Don't pull any locales except en-US by default (controlled by a mozconfig option).
This adds mk_add_options MOZ_CO_LOCALES="en-US sl-SI" or MOZ_CO_LOCALES=all (default is en-US).
Attachment #154237 - Flags: review?(bryner)
Attachment #154237 - Flags: review?(bryner) → review+
Attachment #154237 - Flags: approval-aviary?
Comment on attachment 154237 [details] [diff] [review] allow mk_add_options MOZ_CO_LOCALES="en-US sl-SI" a=ben@mozilla.org
Attachment #154237 - Flags: approval-aviary? → approval-aviary+
Note that fast-update won't work, and may not ever work. I just updated the variables for sanity's sake.
Attachment #154237 - Attachment is obsolete: true
Attachment #157433 - Flags: review?(bryner)
shaver, you're welcome to review this also, since we discussed the effects of "set -e" earlier.
Flags: blocking-aviary1.0PR+
Whiteboard: [has patch] needs review bryner or shaver, blocks l10n but not PR
Comment on attachment 157433 [details] [diff] [review] Make it work with the new multiple CVSROOTs Looks OK to me, but bryner will be taking the hits for any errors, so let's hear from him as well. We've seen this work on windows and mac as well, right?
Attachment #157433 - Flags: superreview+
Tested on unix/mac. I don't have a win32 box to test from here, but I'm not that worried about windows. I'm more worried about oddball *nixes with stupid "/bin/sh", but I'm not doing anything here that isn't done in other parts of the mozilla build, so I think I'm ok. Also, discovered an interesting edge-case when testing mac: if the SSH connection fails (for instance, no private key installed), "cvs" fails with $? = 0. This means that we can't really detect errors. But that's no different than the current behavior, so I'm not going to worry about it.
Attachment #157433 - Flags: review?(bryner) → review+
Attachment #157433 - Flags: approval-aviary?
Comment on attachment 157433 [details] [diff] [review] Make it work with the new multiple CVSROOTs a=ben@mozilla.org
Attachment #157433 - Flags: approval-aviary? → approval-aviary+
Whiteboard: [has patch] needs review bryner or shaver, blocks l10n but not PR → [has patch] ready to land
Fixed, branch and trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Whiteboard: [has patch] ready to land
Will the source tarballs fetaure all locales?
OK, this doesn't quite cut it. It pulls correctly, but when you update it deletes/repulls the locale files, which will cause bad server/network load. Patch coming up.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This is kinda hacky. I tried making the locale dirs readonly, but that ran into platform issues and CVS complained. So I just rename them and then un-rename them.
Attachment #157906 - Flags: review?(bryner)
Keywords: fixed-aviary1.0
Whiteboard: [have patch] - reopened, additional patch needs review bryner
Comment on attachment 157433 [details] [diff] [review] Make it work with the new multiple CVSROOTs >+ @set -e; >+ fast_update() { set -e; config/cvsco-fast-update.pl $$@ 2>&1 | tee -a $(CVSCO_LOGFILE); }; \ there needs to be a "\" after "@set -e;" so that it doesn't print out all the commands.
> there needs to be a "\" after "@set -e;" so that it doesn't print out all the > commands. (and so that the set -e actually works correctly). I checked in this simple fix on branch and trunk.
(In reply to comment #10) > OK, this doesn't quite cut it. It pulls correctly, but when you update it > deletes/repulls the locale files, which will cause bad server/network load. > Patch coming up. And of course will drop all your changes. I was wondering whether removing the locales from /cvsroot would clean stuff up. I don't think that we ever need to get those 1.5 days alive again, right?
Comment on attachment 157906 [details] [diff] [review] Rename locale directories during pull I applied the patch to my tree and end up with a Syntax error: ";" unexpected No idea where, though. cygwin env, GNU Make 3.80
bsmedberg says this work does not actually block PR, just l10n
Flags: blocking-aviary1.0PR-
Flags: blocking-aviary1.0PR+
Flags: blocking-aviary1.0+
Comment on attachment 157906 [details] [diff] [review] Rename locale directories during pull I found the culprit, my bash on linux was a tad more verbose than the cygwin one. >Index: client.mk >=================================================================== >RCS file: /cvsroot/mozilla/client.mk,v >retrieving revision 1.205.2.2.6.5 >diff -u -4 -r1.205.2.2.6.5 client.mk >--- client.mk 1 Sep 2004 20:36:12 -0000 1.205.2.2.6.5 >+++ client.mk 4 Sep 2004 20:38:21 -0000 >@@ -488,14 +488,23 @@ > LOCALES_CO_FLAGS := $(LOCALES_CO_FLAGS) -r $(LOCALES_CO_TAG) > endif > > ifndef MOZ_CO_LOCALES >+LOCK_LOCALES := true > FASTUPDATE_LOCALES := true > CHECKOUT_LOCALES := true >+UNLOCK_LOCALES := true > else > ifeq (all,$(MOZ_CO_LOCALES)) > MOZCONFIG_MODULES += $(addsuffix /all-locales,$(LOCALE_DIRS)) > >+LOCK_LOCALES := \ >+ for dir in $(LOCALE_DIRS); do \ >+ for locale in `cat $$dir/all-locales`; do \ >+ mv $$dir/$$locale $$dir/$$locale-tmp || true; \ >+ done; \ >+ done >+ > FASTUPDATE_LOCALES := \ > for dir in $(LOCALE_DIRS); do \ > for locale in `cat $$dir/all-locales`; do \ > fast_update $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $$dir/$$locale; \ >@@ -508,15 +517,23 @@ > cvs_co $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(LOCALES_CO_FLAGS) $$dir/$$locale; \ > done; \ > done > >+UNLOCK_LOCALES := \ >+ for dir in $(LOCALE_DIRS); do \ >+ for locale in `cat $$dir/all-locales`; do \ >+ mv $$dir/$$locale-tmp $$dir/$$locale || true; \ >+ done; \ >+ done > else > LOCALE_CO_DIRS = $(foreach locale,$(MOZ_CO_LOCALES),$(addsuffix /$(locale),$(LOCALE_DIRS))) > > CVSCO_LOCALES := $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(LOCALES_CO_FLAGS) $(LOCALE_CO_DIRS) > >+LOCK_LOCALES := for dir in $(LOCALE_CO_DIRS); do mv $$dir $$dir-tmp || true; done > FASTUPDATE_LOCALES := fast_update $(CVSCO_LOCALES) > CHECKOUT_LOCALES := cvs_co $(CVSCO_LOCALES) >+LOCK_LOCALES := for dir in $(LOCALE_CO_DIRS); do mv $$dir-tmp $$dir || true; done This wants to be UNLOCK_LOCALES > endif > endif #MOZ_CO_LOCALES > > ####################################################################### >@@ -574,8 +591,9 @@ > real_checkout: > @set -e; \ > cvs_co() { set -e; echo "$$@" ; \ > "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \ >+ $(LOCK_LOCALES); \ > $(CHECKOUT_STANDALONE); \ > $(CHECKOUT_STANDALONE_NOSUBDIRS); \ > cvs_co $(CVSCO_NSPR); \ > cvs_co $(CVSCO_NSS); \ >@@ -590,8 +608,9 @@ > $(CHECKOUT_PHOENIX); \ > $(CHECKOUT_THUNDERBIRD); \ > $(CHECKOUT_STANDALONE_COMPOSER); \ > $(CHECKOUT_CODESIGHS); \ >+ $(UNLOCK_LOCALES); \ > $(CHECKOUT_LOCALES); \ > cvs_co $(CVSCO_SEAMONKEY); > @echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE) > # update the NSS checkout timestamp >@@ -641,8 +660,9 @@ > "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \ > fast_update $(CVSCO_NSPR); \ > cd $(ROOTDIR); \ > cvs_co $(CVSCO_NSS); \ >+ $(LOCK_LOCALES); \ > cd mozilla; \ > fast_update $(CVSCO_PSM); \ > fast_update $(CVSCO_LDAPCSDK); \ > fast_update $(CVSCO_ACCESSIBLE); \ >@@ -654,8 +674,11 @@ > $(FASTUPDATE_PHOENIX); \ > $(FASTUPDATE_THUNDERBIRD); \ > $(FASTUPDATE_STANDALONE_COMPOSER); \ > $(FASTUPDATE_CODESIGHS); \ >+ cd $(ROOTDIR); \ >+ $(UNLOCK_LOCALES); \ >+ cd mozilla; \ > $(FASTUPDATE_LOCALES); \ > fast_update $(CVSCO_SEAMONKEY); > @echo "fast_update finish: "`date` | tee -a $(CVSCO_LOGFILE) > # update the NSS checkout timestamp Anyway, from looking at the cvsco log, which still has a ?mozilla/browser/locales/de-DE-tmp, clining the repository might be just as good.
Attachment #157906 - Flags: review?(bryner) → review+
In the case of Mac, it is not completely localized only with a language package. see bug172444
Not a "blocker"
Flags: blocking-aviary1.0+ → blocking-aviary1.0-
This bug seems to have an aviary branch checkin associated with it. If this has landed on the aviary branch (as much as it's going to for 1.0) can you please add the "fixed-aviary1.0" keyword? Thanks.
Attachment #163148 - Flags: review+
Attachment #163148 - Flags: approval-aviary+
Checked in the last part, co didn't happen by date yet. Marking fixed, with a semi-doesn't-apply-to-the-trunk and a semi-checked-in-on-the-trunk
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: