[Pkg-mozext-maintainers] #573250 -- conflict between policy and mozilla-devscripts about file placement

Alexander Sack asac at ubuntu.com
Mon Mar 22 10:50:01 UTC 2010


On Mon, Mar 22, 2010 at 09:29:42AM +0100, Mike Hommey wrote:
> On Mon, Mar 22, 2010 at 12:58:45AM -0400, Daniel Kahn Gillmor wrote:
> > On 03/19/2010 03:13 AM, Mike Hommey wrote:
> > > On Fri, Mar 19, 2010 at 03:56:02AM +0100, Benjamin Drung wrote:
> > >> Latest idea:
> > >>
> > >> Create a (nearly) empty file
> > >> in /etc/xul-ext/<packagename-without-xul-ext>.js that contains a
> > >> commented header describing where to find the config file.
> > >> Create a link
> > >> in /usr/{share,lib}/xul-ext/<packagename-without-xul-ext>/defaults/preferences/000system.js pointing to /etc/xul-ext/<packagename-without-xul-ext>.js
> > >>
> > >> An updated patch is welcome.
> > >>
> > >> Any objection against this approach?
> > > 
> > > I'm not entirely sure the preferences files are read by filename order.
> > > If that's the case, the system preferences should be read after the
> > > others.
> > > But I think they are read in readdir() order...
> > 
> > urg.  if they're evaluated in readdir() order, then we can't guarantee
> > which preferences will take effect last, can we?  (i'm assuming we're in
> > a last-match-wins scenario, as the files are simple javascript.
> 
> Actually checking is better than assuming ;)
> From nsPrefService.cpp:
>  * Load default pref files from a directory. The files in the
>  * directory are sorted reverse-alphabetically; a set of "special file
>  * names" may be specified which are loaded after all the others.
> 
> The special file names are only used in one place, $APPDIR/defaults/pref
> to handle the unix.js file as special.
> 
> So it seems like using 000something would make the pref file be read
> last.

Thanks for confirming. This matches what i remembered when we used the 000system.js
approach.


 - Alexander




More information about the Pkg-mozext-maintainers mailing list