Page 1 of 1

SVN *** EXTREMELY DANGEROUS ***

Posted: Tue Oct 12, 2010 5:58 pm
by HJarausch
I'd like to warn everybody who is installing the SVN version of CodeLite.

Here my sad history:

I have access to a directory, say /courses/CPP, on a file server of a students' computer lab.
I've installed SVN-CodeLite yesterday with
./configure --prefix=/courses/CPP --plugins-dir=/courses/CPP
make
make -n install (checking it)
make install

Everythings went well (as expected)

Because of missing features due to an old version of wxWidgets, I installed a newer version of wxWidgets
today.
Then again
./configure --prefix=/courses/CPP --plugins-dir=/courses/CPP
make clean
make
make -n install (checking it, but not enough)
make install

now I got the message
uninstalling old version (or similar)
and the whole directory /courses/CPP got nuked.

Fortunately, I lost only a few hours of work, since there is a nightly backup.
But it could have been much worse.
I don't complain since I should have looked more closely to the output of
make -n install
but it's a hard punishment for such a carelessness.

Helmut.

Re: SVN *** EXTREMELY DANGEROUS ***

Posted: Wed Oct 13, 2010 2:32 pm
by nemesis
this happened because of the wrong plugins-dir you entered. there aren't rm -rf lines generated for prefix-pwd but for plugins-dir.. i'm not even sure whether plugins would work if they aren't in the codelite-dir (they are in /usr/lib/codelite by default).
why are you installing it to a non-standard directory anyway?

greets,
nem

Re: SVN *** EXTREMELY DANGEROUS ***

Posted: Wed Oct 13, 2010 7:28 pm
by HJarausch
HJarausch wrote:I'd like to warn everybody who is installing the SVN version of CodeLite.

Here my sad history:

I have access to a directory, say /courses/CPP, on a file server of a students' computer lab.
I've installed SVN-CodeLite yesterday with
./configure --prefix=/courses/CPP --plugins-dir=/courses/CPP
make
make -n install (checking it)
make install

now I got the message
uninstalling old version (or similar)
and the whole directory /courses/CPP got nuked.
I've found the culprit:

Code: Select all

./configure --prefix=/courses/CPP  --plugins-dir=/courses/CPP
installs into /courses/CPP instead of /courses/CPP/lib/codelite and similar.
Now an uninstall is asking for hell.

But

Code: Select all

./configure --prefix=/courses/CPP
works just fine.
This is very irritating,
Helmut.

Re: SVN *** EXTREMELY DANGEROUS ***

Posted: Wed Oct 13, 2010 11:02 pm
by nemesis
it's not irritating. maybe my post was a bit unspecific.
if you hand in a custom plugin-dir the default setting gets overridden (thus deleting your custom directory on uninstall). the new makefile (trunk rev) checks for whether plugins-dir is set to /usr/lib and prevents removing it now.
plugins however should be placed in a separate directory like the codelite-directory, for example /usr/lib/codelite, since they get removed completely on uninstall (plugins dir gets deleted recursively) so in your case --plugins-dir=/Course/CPP/lib/codelite would probably have been correct.
it is unnecessary to set this anyway, since the pluginsdir gets auto-set to $prefixdir/lib/codelite (that's why it worked without setting the pluginsdir separately).
so for the record:
prefix (default) = /usr
plugins-dir (default) = $prefix/lib/codelite
and each one gets overriden by the respective userswitch

greets,
nem

Re: SVN *** EXTREMELY DANGEROUS ***

Posted: Thu Oct 14, 2010 10:51 am
by HJarausch
nemesis wrote:it's not irritating. maybe my post was a bit unspecific.
if you hand in a custom plugin-dir the default setting gets overridden (thus deleting your custom directory on uninstall). the new makefile (trunk rev) checks for whether plugins-dir is set to /usr/lib and prevents removing it now.
plugins however should be placed in a separate directory like the codelite-directory, for example /usr/lib/codelite, since they get removed completely on uninstall (plugins dir gets deleted recursively) so in your case --plugins-dir=/Course/CPP/lib/codelite would probably have been correct.
it is unnecessary to set this anyway, since the pluginsdir gets auto-set to $prefixdir/lib/codelite (that's why it worked without setting the pluginsdir separately).
so for the record:
prefix (default) = /usr
plugins-dir (default) = $prefix/lib/codelite
and each one gets overriden by the respective userswitch

greets,
nem
Hi,
perhaps the notion "prefix" has trapped me. If I say --prefix=/usr/local I don't expect the package to install something
directly into /usr/local but in some subdirectory.
So, I was expecting CodeLite would install into something like
<PREFIX>/lib/codelite or <PREFIX>/share/codelite
At least, that would cause much less harm if someone misinterprets is like me.
Regards,
Helmut.

Re: SVN *** EXTREMELY DANGEROUS ***

Posted: Thu Oct 14, 2010 3:34 pm
by DavidGH
Hi Helmut,

Just to mention that, in the current svn version, your problem wouldn't have happened. It's now not necessary to specify --plugins-dir at all (though you can if you really want to). If you provide a --prefix, plugins-dir now defaults <prefix>/lib/codelite.

However, I'm not sure how you managed to lose user data, unless you were storing it in the same dir to which you installed CodeLite. I'd suggest that wouldn't be a good place to put it anyway.

Regards,

David

Re: SVN *** EXTREMELY DANGEROUS ***

Posted: Sun Oct 17, 2010 1:38 am
by foxmuldr
Suggest the title of this thread be renamed: SVN: A warning if using --prefix