xfce-4.2.2 graphical installer problem
Auke Kok
sofar at lunar-linux.org
Fri May 20 22:28:46 CEST 2005
Olivier Fourdan wrote:
> On Thu, 2005-05-19 at 18:42 -0700, Brian J. Tarricone wrote:
>
>>Ah, that's fun. Two solutions I think: 1) modify the installer so it
>>does rm -rf on the temporary install sandbox on startup, 2) modify the
>>Makefile so it checks if it's already a directory and then doesn't try
>>mkdir. I think #1 is probably safer - it's not really a good idea to
>>install into a messy install sandbox anyway.
>
>
> Unfortunately, #1 is not a solution because the installer installs files
> in a separate directory first, in case something goes wrong before
> completion, it doesn't override, change or remove existing installation
> until installation is successfully completed (which is IMHO very smart
> from Benny).
>
> The only option is to fix the installation, which is not that hard...
> I'll take care of that.
excuse me for butting in but I think you guys are overseeing one thing:
most likely it IS the (current!) installer itself that is wrong, and
here is why:
suppose the installer needs to install something in /usr/share/somewhere
and assumes that 'somewhere' is such a common directory that the person
who wrote it never bothered to 'mkdir -p' it first. the first file that
gets installed with 'install file /usr/share/something' (note missing
trailing '/') will be copied to the FILE '/usr/share/something'.
This breaks subsequent attempts to install files into the directory
'usr/share/something' of course.
I've encountered this hundreds of times in packages with lunar by now.
The only proper way to fix is to make sure you (almost always) mkdir -p
first, and when using 'install', to make sure you append a '/' behind
the target directory. The trailing '/' would cause an error that makes
sense to the user: 'Missing directory' or something. THis is easily
spotted and fixed too.
If you still have breaking installations then the only thing you can do
is let the user clean it up himself. This approach works best and makes
sure you don't break other things even worse.
HTH,
sofar
More information about the Xfce
mailing list