Personal tools

Auto-tools/Projects/ProfileManager

From MozillaWiki

Jump to: navigation, search

In order to test different user configurations and add-ons, a tool should be made to enable profile management. The existing profile manager will eventually go away (see bug 214675) and even more eventually be replaced by a new UI (see bug 540194). However, in the interim, a profile manager must be implemented for testing and triaging: bug 539524]

This is a work in progres

Contents

Status

There is a working alpha with most of requirements satisfied (and more being satisfied every day!):

http://hg.mozilla.org/automation/profilemanager

There are occasionally-updated builds available at:

http://people.mozilla.org/~jgriffin/profilemanager/

Requirements

From bug 539524 (see the bug for a more complete set):

  • the ability to clone or duplicate a profile
  • the ability to create a one-time-use profile
  • the ability to generate a profile with certain default preferences or in a snapshot state
  • the ability to back up an entire profile
  • the ability to package a profile for migration to a new system
  • the ability to unpack a profile that's being migrated from an existing system
  • Restoring a backed-up profile
  • Merge two profiles together.

More functionality will be included as the scope of work is refined.

Merging Profiles

Merging profiles is hard, generally because addons can put all kinds of things in there. If a file doesn't exist in profile a but does exist in profile b, the merged profile will contain the file. If both profiles contain the same file, then what to do depends on the file:

  • .ini: merging these is straight-forward and is equivalent to updating a hash on a per-section basis
  • sqlite: a merged DB can be made from adding in all rows in the set of merged DBs to each table. But there are many niche cases. If a row has a unique field, subsequent rows with the same unique field should be updated instead of added. What about multiple unique fields? What about auto-incremented fields? Etc. It is likely that a good solution could be found from database introspection, and at least the core (non-addon) database schemas and intention are well understood, but it is not trivial.
  • XML/HTML/RDF: superficially, the problem is similar to merging databases, but probably slightly easier. more details to be added
  • prefs.js: while the file is not exactly a traditional datastore, merging these is actually straight-forward.
  • other: in general, all sorts of files live in a profile. This is why merging is hard.

Because of this difficulty, merging profiles will not be part of the 2010 Q3 goal.

Bugs

List of bugs related to the project:

https://bugzilla.mozilla.org/buglist.cgi?resolution=---&resolution=DUPLICATE&query_format=advanced&component=ProfileManager&product=Testing

Original spec/requirement bugs:

Architecture

  • there is a XUL application that replaces that graphical profile manager currently in Firefox which consumes the API; most of the code is in ui.js


Related resources

Projects Using Profiles

Several projects are already related to profile management. Ideally, these should be consolidated (once relative stability is reached) and the innards of profile management should be documented.

python projects