MAR manifest directive should take a directory and a destination filename
Categories
(Toolkit :: Application Update, task, P3)
Tracking
()
People
(Reporter: bytesized, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidedi-ope])
This bug tracks adding a data field to MARs that we ship. As described in the MAR documentation, the MAR format was designed to be able to accommodate additional data sections.
In order for the updater to know when to migrate an installation to use versioned install directories, the migration code needs to be present and then an update needs to be downloaded that is configured to use versioned installation directories. Then the updater can perform the migration and install the new version that supports it at the same time. This all hinges, however, on the updater being able to tell whether the update it will install uses versioned installation directories or not. This flag will allow us to do that by simply propagating the value of the build flag (Bug 1891616).
In addition to adding this fields to MARs, this bug encompasses adding the functionality to the updater to read these fields (gated behind the build flag - see Bug 1891616).
We don't change the MAR format often. We might want to consider making multiple changes as long as we are doing it.
It might be nice to fix Bug 1875183 while we are here.
I have this vague memory that nalexander had another MAR format change in mind that we might want to consider. Unfortunately I no longer seem to remember what it was.
@nalexander Do you remember what I'm thinking about here?
Updated•1 year ago
|
| Reporter | ||
Comment 1•1 year ago
•
|
||
We are going to change around the design of this feature so that we can fix several problems at once:
- The original problem here - being able to migrate users to use versioned installations directories when Balrog indicates that we are ready to migrate.
- Ability to roll out slowly rather than all at once (this is expanded on in Bug 1891600 Comment 1).
- Ability to update the distribution directory, which will be located outside the versioned install directory.
We can solve all these problems at once with manifest directive directories. Right now, the manifest (ignoring the first line, the type) is basically just a list of directives for what to do with each file in the MAR. For example:
type "complete"
add "xul.dll"
add-if-not "update-settings.ini" "update-settings.ini"
remove "distribution/bad_file"
...
By adding enumerated names from a predetermined list of directories, we can ship the same MARs when using versioned and non-versioned installation directories, even if some of the files differ. We probably want the list of directories to look something like this:
installation- The root installation directory if not using versioned install dirs, otherwise the versioned directory.distribution- The<root>/distributiondirectory.versioned-installation- Same asinstallationbut the file will only be installed if we are using versioned install dirs.non-versioned-installation- Same asinstallationbut the file will only be installed if we are not using versioned install dirs.
We also want to modify all relevant directives to take a destination filename in addition to a source to allow us to ship two files with the same installed-name that are installed in different circumstances.
The result should be the manifest looking like this:
type "complete"
add installation "xul.dll" "xul.dll"
add-if-not installation "update-settings.ini" "update-settings.ini" "update-settings.ini"
remove distribution "bad_file"
add versioned-installation "is_versioned.dll" "check_is_versioned.dll"
add non-versioned-installation "is_not_versioned.dll" "check_is_versioned.dll"
Description
•