Auto-tools/Projects/ProfileManager

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]

Requirements

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.