Closed
Bug 1059467
Opened 10 years ago
Closed 10 years ago
Move precomplete file from the root of the Mac bundle to Contents/Resources
Categories
(Toolkit :: Application Update, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)
References
Details
Attachments
(1 file, 8 obsolete files)
(deleted),
patch
|
bbondy
:
review+
|
Details | Diff | Splinter Review |
On Mac OS the precomplete file will need to be moved to Contents/Resources
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
removed-files change had snuck into the first patch
Attachment #8480075 -
Attachment is obsolete: true
Comment 3•10 years ago
|
||
IIRC we put precomplete at the top of the .app to force OSX to refresh something after an update (icon, or version in the Get Info maybe). Do we have to accept a regression as part of the packaging changes ?
Assignee | ||
Comment 4•10 years ago
|
||
Already handled. There is code to perform essentially a touch to the app bundle after a successful update. I had hope that this one-off code could one day be removed with the addition of the precomplete file that I added as part of Firefox 5 since that does the same thing but with it moving the code that performs the touch will suffice.
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/updater/updater.cpp#2315
Assignee | ||
Updated•10 years ago
|
Attachment #8480244 -
Flags: review?(nthomas)
Assignee | ||
Comment 5•10 years ago
|
||
I need to modify the test mar files before I can change this properly but this suffices for now.
Comment 6•10 years ago
|
||
Comment on attachment 8480244 [details] [diff] [review]
Mar packaging code and precomplete generation (wip)
Review of attachment 8480244 [details] [diff] [review]:
-----------------------------------------------------------------
::: tools/update-packaging/make_incremental_updates.py
@@ +335,5 @@
> to_dir_path = os.path.abspath(to_dir_path)
> # Create a hashtable of the from and to directories
> from_dir_hash,from_file_set,from_dir_set = patch_info.build_marfile_entry_hash(from_dir_path)
> to_dir_hash,to_file_set,to_dir_set = patch_info.build_marfile_entry_hash(to_dir_path)
> + # Create a list of the forced updates
Nit, trailing whitespace.
@@ +348,5 @@
> + forced_list.append("Contents/Resources/precomplete")
> + else:
> + forced_list.append("Contents\Resources\precomplete")
> + else:
> + forced_list.append("precomplete")
Alternatively something like:
for location in ('precomplete', 'Contents/Resources/precomplete', 'Contents\Resources\precomplete'):
if location in to_file_set:
forced_list.append(location)
break
else:
raise Exception, "missing precomplete file in: "+to_dir_path
Attachment #8480244 -
Flags: review?(nthomas) → review+
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Nick Thomas [:nthomas] from comment #6)
>...
> @@ +348,5 @@
> > + forced_list.append("Contents/Resources/precomplete")
> > + else:
> > + forced_list.append("Contents\Resources\precomplete")
> > + else:
> > + forced_list.append("precomplete")
>
> Alternatively something like:
> for location in ('precomplete', 'Contents/Resources/precomplete',
> 'Contents\Resources\precomplete'):
> if location in to_file_set:
> forced_list.append(location)
> break
> else:
> raise Exception, "missing precomplete file in: "+to_dir_path
That will raise an exception except when the first item is found so I went with what I originally had.
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8480244 -
Attachment is obsolete: true
Attachment #8486658 -
Flags: review+
Assignee | ||
Comment 9•10 years ago
|
||
The test changes to support v2 signing are massive and will be done in bug bug1058182.
Attachment #8481061 -
Attachment is obsolete: true
Attachment #8486977 -
Flags: review?(netzen)
Assignee | ||
Comment 10•10 years ago
|
||
I reverted one change so the tests continue to pass on Mac without creating the new mar files. I'll create those as soon as I am able.
Attachment #8486977 -
Attachment is obsolete: true
Attachment #8486977 -
Flags: review?(netzen)
Attachment #8487752 -
Flags: review?(netzen)
Updated•10 years ago
|
Attachment #8487752 -
Flags: review?(netzen) → review+
Assignee | ||
Comment 11•10 years ago
|
||
This way the precomplete file is always listed in the precomplete file to lessen the chance that the precomplete file will be different than the one present when generating the bundle's signature so the signature won't be invalid.
Attachment #8489185 -
Flags: review?(nthomas)
Assignee | ||
Comment 12•10 years ago
|
||
stray tab snuck in
Attachment #8489185 -
Attachment is obsolete: true
Attachment #8489185 -
Flags: review?(nthomas)
Attachment #8489186 -
Flags: review?(nthomas)
Comment 13•10 years ago
|
||
Comment on attachment 8489186 [details] [diff] [review]
Create precomplete before enumerating files
r+, assuming the updater has read and closed precomplete before trying to remove it.
Attachment #8489186 -
Flags: review?(nthomas) → review+
Assignee | ||
Comment 14•10 years ago
|
||
It is
Assignee | ||
Comment 15•10 years ago
|
||
Brian, can I get an r+ for the following change to the original updater.cpp patch which is now possible with the updated mar files in bug 1058182.
diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -3646,27 +3619,27 @@ GetManifestContents(const NS_tchar *mani
}
int AddPreCompleteActions(ActionList *list)
{
if (sIsOSUpdate) {
return OK;
}
+#ifdef XP_MACOSX
+ NS_tchar *rb = GetManifestContents(NS_T("Contents/Resources/precomplete"));
+#else
NS_tchar *rb = GetManifestContents(NS_T("precomplete"));
+#endif
if (rb == nullptr) {
- //XXX Temporary since requiring this location on Mac OS X will require making new test mar files
- rb = GetManifestContents(NS_T("Contents/Resources/precomplete"));
- if (rb == nullptr) {
- LOG(("AddPreCompleteActions: error getting contents of precomplete " \
- "manifest"));
- // Applications aren't required to have a precomplete manifest. The mar
- // generation scripts enforce the presence of a precomplete manifest.
- return OK;
- }
+ LOG(("AddPreCompleteActions: error getting contents of precomplete " \
+ "manifest"));
+ // Applications aren't required to have a precomplete manifest. The mar
+ // generation scripts enforce the presence of a precomplete manifest.
+ return OK;
}
int rv;
NS_tchar *line;
while((line = mstrtok(kNL, &rb)) != 0) {
// skip comments
if (*line == NS_T('#'))
continue;
Attachment #8489879 -
Flags: review?(netzen)
Assignee | ||
Updated•10 years ago
|
Attachment #8486658 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8487752 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8489186 -
Attachment is obsolete: true
Updated•10 years ago
|
Attachment #8489879 -
Flags: review?(netzen) → review+
Comment 16•10 years ago
|
||
(In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #15)
> Created attachment 8489879 [details] [diff] [review]
> Combined patch
>
> Brian, can I get an r+ for the following change to the original updater.cpp
> patch which is now possible with the updated mar files in bug 1058182.
>
>
> diff --git a/toolkit/mozapps/update/updater/updater.cpp
> b/toolkit/mozapps/update/updater/updater.cpp
> --- a/toolkit/mozapps/update/updater/updater.cpp
> +++ b/toolkit/mozapps/update/updater/updater.cpp
> @@ -3646,27 +3619,27 @@ GetManifestContents(const NS_tchar *mani
> }
>
> int AddPreCompleteActions(ActionList *list)
> {
> if (sIsOSUpdate) {
> return OK;
> }
>
> +#ifdef XP_MACOSX
> + NS_tchar *rb =
> GetManifestContents(NS_T("Contents/Resources/precomplete"));
> +#else
> NS_tchar *rb = GetManifestContents(NS_T("precomplete"));
> +#endif
> if (rb == nullptr) {
> - //XXX Temporary since requiring this location on Mac OS X will require
> making new test mar files
> - rb = GetManifestContents(NS_T("Contents/Resources/precomplete"));
> - if (rb == nullptr) {
> - LOG(("AddPreCompleteActions: error getting contents of precomplete " \
> - "manifest"));
> - // Applications aren't required to have a precomplete manifest. The
> mar
> - // generation scripts enforce the presence of a precomplete manifest.
> - return OK;
> - }
> + LOG(("AddPreCompleteActions: error getting contents of precomplete " \
> + "manifest"));
> + // Applications aren't required to have a precomplete manifest. The mar
> + // generation scripts enforce the presence of a precomplete manifest.
> + return OK;
> }
>
> int rv;
> NS_tchar *line;
> while((line = mstrtok(kNL, &rb)) != 0) {
> // skip comments
> if (*line == NS_T('#'))
> continue;
yep :)
Comment 17•10 years ago
|
||
Assignee | ||
Comment 18•10 years ago
|
||
Pushed to fx-team
https://hg.mozilla.org/integration/fx-team/rev/d3025e55dfc3
Comment 19•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Assignee | ||
Comment 20•10 years ago
|
||
Landed on aurora in the Mac V2 signing combined patch in bug 1047584
status-firefox34:
--- → fixed
status-firefox35:
--- → fixed
Updated•10 years ago
|
Flags: qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•