Closed
Bug 238741
Opened 22 years ago
Closed 21 years ago
ExistAllXPIs should check that the .xpi files are actually ok
Categories
(SeaMonkey :: Installer, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ajschult784, Assigned: ajschult784)
References
Details
(Keywords: dataloss)
Attachments
(3 files, 2 obsolete files)
|
12.46 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
|
12.38 KB,
patch
|
dveditz
:
superreview+
|
Details | Diff | Splinter Review |
|
11.19 KB,
patch
|
asa
:
approval1.8b4+
|
Details | Diff | Splinter Review |
If you use the net installer, and cancel part-way through the last one, the
installer leaves behind a marker file, but the installer ignores the marker
because ExistAllXPIs (called from nsInstaller:Show) concludes that everything is
finished simply because all the files exist. nsXIEngine::Download then skips
the files and barfs (either by trying to redownload without the UI properly
initted, or by trying to install an incomplete .xpi).
| Assignee | ||
Comment 1•22 years ago
|
||
this makes VerifyArchive a helper function and uses it to check the XPIs for
zip-validity. Any incomplete downloads are clobbered since there is no way to
tell what the real file size is supposed to be (at least for talkback).
it also makes the number displayed in the GUI reasonable for cases like this.
(1/1 instead of 9/1 when you're just downloading Venkman).
| Assignee | ||
Updated•22 years ago
|
Attachment #144942 -
Flags: review?(bsmedberg)
Comment 2•22 years ago
|
||
Comment on attachment 144942 [details] [diff] [review]
patch
I don't get it. Why are you moving this function out of the nsXIEngine class
but not making it static? Keep things the way they are unless you have a good
reason not to.
| Assignee | ||
Comment 3•22 years ago
|
||
Comment on attachment 144942 [details] [diff] [review]
patch
I've got a new patch
Attachment #144942 -
Attachment is obsolete: true
Attachment #144942 -
Flags: review?(bsmedberg)
| Assignee | ||
Comment 4•22 years ago
|
||
just make VerifyArchive static. It has to be static and/or not a member to
compile since ExistAllXPIs is static.
Also, I noticed running with the previous patch that there's a substantial perf
hit. ExistAllXPIs was being called 3 times when the XPIs were already there
(SEA installer). This patch sets bDownload the first time and only calls
engine->Download() if bDownload is TRUE.
| Assignee | ||
Updated•22 years ago
|
Attachment #146821 -
Flags: review?(bsmedberg)
| Assignee | ||
Comment 5•22 years ago
|
||
Comment on attachment 146821 [details] [diff] [review]
patch2
ugh.
if you choose one setup type that has all the XPIs and go forward, then back,
change to a setup type that needs more XPIs that are available, the current
installer will download them, but won't show the proxy settings panel.
with this patch, they wouldn't be downloaded.
Attachment #146821 -
Attachment is obsolete: true
Attachment #146821 -
Flags: review?(bsmedberg)
| Assignee | ||
Comment 6•22 years ago
|
||
this one works, promise!
in addition to what I mentioned previously, the previous patch was not setting
mTotalComps for the SEA installer because it never called Download.
mTotalComps was only needed by nsXIEngine::Install, so I moved it there and
deleted the member variable.
Also, nsComponentList::GetLengthSelected was totally broken. I'm guessing the
scary comment is there because it was broken. Nothing currently uses the
method.
| Assignee | ||
Updated•22 years ago
|
Attachment #147526 -
Flags: review?(bsmedberg)
Updated•22 years ago
|
QA Contact: bugzilla → agracebush
Comment 7•22 years ago
|
||
Comment on attachment 147526 [details] [diff] [review]
patch v3
>@@ -586,50 +578,48 @@ nsInstallDlg::PerformInstall()
>- comps = gCtx->sdlg->GetSelectedSetupType()->GetComponents();
>- if (!comps)
>- {
>- ErrorHandler(E_NO_COMPONENTS);
>- return E_NO_COMPONENTS;
>- }
>+ comps = gCtx->sdlg->GetSelectedSetupType()->GetComponents();
Can you explain why the (!comps) check is not needed? Other than that, r=me
Attachment #147526 -
Flags: review?(bsmedberg) → review+
| Assignee | ||
Comment 8•22 years ago
|
||
> Can you explain why the (!comps) check is not needed? Other than that, r=me
The check is in PerformInstall. The components parser checks for lack of
components and bails if that is the case. In fact, that is the only way the
component list could be NULL. Furthermore, the component list is used elsewhere
(before PerformInstall) without checking it first.
In general, I find the installer code overly-paranoid.
| Assignee | ||
Comment 9•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #148103 -
Flags: superreview?(dveditz)
Updated•21 years ago
|
Product: Browser → Seamonkey
Comment 10•21 years ago
|
||
Comment on attachment 148103 [details] [diff] [review]
patch merged to trunk
sr=dveditz
Attachment #148103 -
Flags: superreview?(dveditz) → superreview+
| Assignee | ||
Comment 11•21 years ago
|
||
This changes quite a bit, but should mainly affect doing a net install with
some but not all xpis, which is currently completely broken (and this patch
fixes it work well).
I tried a bunch of different install types for stub / SEA installer with this
patch applied and coudln't find anything that was broken.
Attachment #189147 -
Flags: approval1.8b4?
Updated•21 years ago
|
Attachment #189147 -
Flags: approval1.8b4? → approval1.8b4+
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•