[OS X TeX] i-Installer 2.79 released. Bugfix for potential harmful bug
Gerben Wierda
Gerben.Wierda at rna.nl
Sat Sep 23 01:13:45 CEST 2006
I have just released version 2.79 of i-Installer. Both II2.dmg and
TeX-fat.dmg have been updated. The i-Installer i-Package has been
updated.
i-Installer 2.78 and before (at least since Feb 2004 when it was
freshly checked in at sourceforge) had a potential harmful bug.
When a new location is entered in Preferences for the Default Save
directory three things normally happen:
1. Create the new directory if necessary
2. Move all the i-Packages from old to new directory
3. Remove old directory unless something in it was not moved (e.g.
something else than an i-Package)
As it turns out, when the move of any i-Package failed, the old
directory was removed nonetheless and in Cocoa this succeeds, even if
the directory is not empty (in unix, a remove of a directory normally
only succeeds if the directory is empty).
So here is a scenario where this may lead to data loss:
1. Assume your Default Save Directory is ~/Documents/i-Packages
2. Copy one of these (say, bibtools.ii2) to a new location (creating
the directory first if necessary) , say ~/Library/i-Packages
3. Now, in i-Installer, open Preferences and change the Default Save
Directory location from ~/Documents/i-Packages to ~/Library/i-
Packages and hit Apply
- The i-Packages in ~/Documents/i-Packages will be moved to ~/
Documents/i-Packages.
- As soon as the attempt to move bibtools.ii2 is made, the move
series stops and an alert sheet is shown on the Preferences window.
(This sheet contains noe missing string (displayed as "nil") because
there is a small bug in the Apple Frameworks).
- The old directory with all its contents is removed as if all the
move operations was succesful (this is the bug)
Normally, you will only lose data that has been downloaded from i-
Installer repositories and you will not lose personal data.
But it *is* possible to lose other data. Everything that is in your
Deault Save Directory is lost and only the i-Packages in it have been
in an attempt to move to teh new location. Hence, in case you have
added personal stuff to ~/Documents/i-Package and you try to change ~/
Documents/i-Packages in i-Installer preferences to some place where
there already exists one of the i-Packages, the personal stuff gets
lost.
A pretty horrible scenario I could dream up is:
- Change your Default Save Location to ~ (home directory, all your i-
Packages move there)
- Create a new directory (or use an existing one) and copy
(duplicate) one of the i-Packages from ~ to the new location
- Open Preferences in i-Installer and change ~ into that new directory
If you do that with any version of i-Installer before 2.79, you will
lose your entire home directory.
I must add that you need to make a very special set of circumstances
to get data loss of i-Packages only, let alone what you have to do to
lose anything else. Still, it is possible and I suspect of at least
one case where someone was hit by this and lost his already
downloaded i-Packages. Hence, I have repaired this immediately.
Note: unless you run i-Installer as root (which is a bad idea for
most programs), operations like moving the Default Save Directory run
with normal user privileges and it is therefore not possible you
damage anything on your system except personal data.
I will also update al the i-Packages such that they will require at
least version 2.79, just to force people to upgrade i-Installer. This
will take some time.
G
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list