Closed
Bug 790115
Opened 12 years ago
Closed 11 years ago
[elm] .purgecaches file not working automatically in elm builds
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla21
People
(Reporter: mbrubeck, Assigned: glandium)
References
Details
(Whiteboard: [completed-elm])
Attachments
(2 files, 3 obsolete files)
2.30 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
2.43 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
When I update my local build of the "elm" branch, and then run either the desktop or Metro browser, the browser fails to find or remove the .purgecaches file. I have to use -purgecaches or MOZ_PURGE_CACHES instead. .purgecaches is created in $OBJDIR/dist/bin: http://hg.mozilla.org/projects/elm/file/6ccd07cc1346/config/rules.mk#l1669 ...but we look for it in the appData directory: http://hg.mozilla.org/projects/elm/file/6ccd07cc1346/toolkit/xre/nsAppRunner.cpp#l3513 On elm, this directory is either dist/bin/metro or dist/bin/browser: http://hg.mozilla.org/projects/elm/file/6ccd07cc1346/browser/app/nsBrowserApp.cpp#l216 http://hg.mozilla.org/projects/elm/file/6ccd07cc1346/browser/app/nsBrowserApp.cpp#l233
Reporter | ||
Updated•12 years ago
|
OS: Windows 7 → Windows 8 Metro
Summary: [elm] .purgecaches file not working automatically in elm builds on Windows 8 Metro → [elm] .purgecaches file not working automatically in elm builds
Reporter | ||
Comment 1•12 years ago
|
||
This is the simplest fix I could see, though it seems a bit inelegant. (Would it be better to make nsAppRunner always look for .purgecaches in the same place?)
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 660178 [details] [diff] [review] patch Review of attachment 660178 [details] [diff] [review]: ----------------------------------------------------------------- Note you need to change js/src/config/rules.mk when you change config/rules.mk. ::: config/rules.mk @@ +1667,5 @@ > > +APP_DATA_DIRS = \ > + $(DIST)/bin \ > + $(DIST)/bin/browser \ > + $(DIST)/bin/metro \ That's kind of awful :( An idea that would work is, provided that DIST_SUBDIR is defined for metro (it is for browser on elm), to use $(DIST)/bin/$(DIST_SUBDIR), and only that. And that would work for more than browser or metro. @@ +1674,4 @@ > default all:: > + for dir in $(APP_DATA_DIRS); do \ > + if test -d $$dir ; then touch $$dir/.purgecaches ; fi ; \ > + done It would be better to use make dependencies.
Attachment #660178 -
Flags: review?(mh+mozilla) → review-
Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #2) > That's kind of awful :( Agreed, but I'm not sure how to make a prettier version that works. :( > An idea that would work is, provided that DIST_SUBDIR is defined for metro > (it is for browser on elm), to use $(DIST)/bin/$(DIST_SUBDIR), and only > that. And that would work for more than browser or metro. An elm build with --enable-metro produces both "browser" and "metro", so when building changes that affect shared components (like toolkit) we really want to touch both .purgecaches files and not just one of them. DIST_SUBDIR is set to "metro" only when building the /browser/metro directory, so this wouldn't remove the cache properly if you built only in /toolkit or /services.
Reporter | ||
Comment 4•12 years ago
|
||
This feel less like an abomination, but still not very elegant...
Attachment #660178 -
Attachment is obsolete: true
Attachment #660247 -
Flags: feedback?(mh+mozilla)
Reporter | ||
Comment 5•12 years ago
|
||
forgot to qref
Attachment #660247 -
Attachment is obsolete: true
Attachment #660247 -
Flags: feedback?(mh+mozilla)
Attachment #660249 -
Flags: review?(mh+mozilla)
Reporter | ||
Updated•12 years ago
|
Attachment #660249 -
Attachment is patch: true
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 660249 [details] [diff] [review] patch v2 Review of attachment 660249 [details] [diff] [review]: ----------------------------------------------------------------- ::: config/rules.mk @@ +1665,5 @@ > libs export:: > $(CHECK_FROZEN_VARIABLES) > > +ifdef DIST_SUBDIR > +PURGECACHES_FILES = $(DIST)/bin/$(DIST_SUBDIR)/.purgecaches DIST_SUBDIR is only set to browser when building under browser/, so the problem you raise in comment 3 would still be there :( so you'd pretty much need to hardcode browser in there, probably depending on the MOZ_BUILD_APP. @@ +1678,2 @@ > default all:: > + if test -d $$dir ; then touch $(PURGECACHES_FILES) ; fi ; \ Please use make dependencies, like: default all: $(PURGECACHE_FILES) $(PURGECACHE_FILES): test -d ${@D} && touch $@ And don't forget to update js/src/config/rules.mk as well :)
Attachment #660249 -
Flags: review?(mh+mozilla) → review-
Reporter | ||
Comment 7•12 years ago
|
||
Addresses review comments. If we want to avoid browser-specific code in rules.mk, we could move it to /browser/app-rules.mk instead.
Attachment #660249 -
Attachment is obsolete: true
Attachment #660498 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•12 years ago
|
Attachment #660498 -
Flags: review?(mh+mozilla) → review+
Reporter | ||
Comment 8•12 years ago
|
||
https://hg.mozilla.org/projects/elm/rev/9bad0d06ba0f
Whiteboard: [completed-elm]
Comment 9•12 years ago
|
||
Should this be tracked as a dependent of bug 755724 so it makes it into mc?
Assignee | ||
Updated•12 years ago
|
Blocks: metro-build
Reporter | ||
Comment 10•12 years ago
|
||
Pushed a trivial followup to fix a build error in a clobber build: https://hg.mozilla.org/projects/elm/rev/fca9249a16fa
Assignee | ||
Comment 11•11 years ago
|
||
Bug 755724 will require that PURGECACHES_DIRS is set to $(DIST)/bin/browser for browser/. This is derived from mbrubeck's patch that landed on elm.
Attachment #712360 -
Flags: review?(ted)
Assignee | ||
Updated•11 years ago
|
Assignee: mbrubeck → mh+mozilla
Updated•11 years ago
|
Attachment #712360 -
Flags: review?(ted) → review+
Assignee | ||
Comment 12•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2d9c75b462f8
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Updated•10 years ago
|
OS: Windows 8 Metro → Windows 8.1
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•