auto and silent modes should check destination directory

RESOLVED FIXED

Status

SeaMonkey
Installer
RESOLVED FIXED
15 years ago
14 years ago

People

(Reporter: Andrew Schultz, Assigned: Andrew Schultz)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

13.94 KB, patch
Benjamin Smedberg
: review+
Details | Diff | Splinter Review
11.36 KB, patch
Details | Diff | Splinter Review
13.07 KB, patch
Brian Ryner (not reading)
: review+
Brian Ryner (not reading)
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

15 years ago
this timed out trying to submit... let's try this:

auto and silent installer modes skip SetupTypeDlg and go straight to
InstallerDlg.  This means they skip SetupTypeDlg's VerifyDestination,
DeleteOldInst and VerifyDiskSpace.

Things aren't so bad because XPInstall creates the Mozilla directory when it
tries to create the first file.  But it also happily installs in old Mozilla
directories without deleting them, which is bad.

The installer should delete the directory if it's a Mozilla directory and bail
if it's a non-Mozilla directory (bug 234741)
(Assignee)

Comment 1

15 years ago
*** Bug 234745 has been marked as a duplicate of this bug. ***

Comment 2

15 years ago
But when is a mozilla directory a mozilla directory ;-)
(Assignee)

Comment 3

15 years ago
based on the same criteria that it has now.  If the directory has "mozilla-bin"
(or anything else specified in the "Legacy Check"), then it's a Mozilla
directory.  If the definition of a "Mozilla directory" changes, then the
behavior of auto/silent mode will come along for the ride.
(Assignee)

Comment 4

15 years ago
Created attachment 141943 [details] [diff] [review]
patch

this patch fixes the bug.  in addition to what might be expected, this patch
1. makes E_MKDIR_FAIL a fatal error for auto/silent modes.
2. make VerifyDestination and DeleteOldInst always return to
nsSetupTypeDlg::Next() without firing off nsInstallDlg.  Without this change,
VerifyDiskSpace was called ONLY when installing to a pre-existing empty
directory.
3. make the installer bail on fatal errors in silent mode.
(Assignee)

Comment 5

15 years ago
Created attachment 146485 [details] [diff] [review]
patch

This moves work out of nsXInstaller and creates a directory after deleting it.

The directory creation won't be needed after bug 240677 since the directory
itself won't be deleted.  I ripped out the umask dance from CreateDestYes to be
consistent with what I added.  The umask code has no effect:

The resulting perms are (0777 & ~oldUmask) & ~022   (~022 = 0755)

& is commutative, so that's just 0755 & ~oldUmask, but you can get that by just
using 0755 in the first place.
(Assignee)

Updated

15 years ago
Attachment #141943 - Attachment is obsolete: true
(Assignee)

Comment 6

15 years ago
Created attachment 146486 [details] [diff] [review]
patch with diff -b

the last part of the patch is easier to read here
(Assignee)

Updated

15 years ago
Attachment #146486 - Flags: review?(dveditz)
(Assignee)

Updated

15 years ago
Attachment #146486 - Flags: review?(dveditz)
(Assignee)

Updated

15 years ago
Attachment #146485 - Flags: review?(dveditz)
(Assignee)

Updated

15 years ago
Attachment #146485 - Flags: review?(dveditz) → review?(bsmedberg)

Updated

14 years ago
Attachment #146485 - Flags: review?(bsmedberg) → review+
(Assignee)

Comment 7

14 years ago
Created attachment 147860 [details] [diff] [review]
patch merged to trunk

this is the previous patch merged to trunk + a bMoving hack to make gtk1 happy.
(Assignee)

Updated

14 years ago
Attachment #147860 - Flags: review?(bryner)

Updated

14 years ago
QA Contact: bugzilla → agracebush
Attachment #147860 - Flags: review?(bryner) → review+
(Assignee)

Comment 8

14 years ago
Comment on attachment 147860 [details] [diff] [review]
patch merged to trunk

oops.
bryner, I really wanted your sr=.  I already had r=bsmedberg.
Attachment #147860 - Flags: superreview?(bryner)
Attachment #147860 - Flags: superreview?(bryner) → superreview+
(Assignee)

Comment 9

14 years ago
fixed
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.