Open stdedos opened 3 years ago
Hi @stdedos and thanks for opening this issue.
As you can see in the mentioned file, the Ubuntu package removing only:
Before the these, we run rvm implode
in prerm
, which deletes rubies too.
https://github.com/rvm/ubuntu_rvm/blob/f6da3a5fb8753859a7458e56cc25ad289ec12e76/debian/prerm#L27
Hello @raelgc 😀
I don't know if something is wrong with my installation, but /rubies/
are under /usr/share/rvm
IIRC.
Therefore rm -Rf /usr/share/rvm
"means also" rm -Rf /usr/share/rvm/rubies
.
Or am I wrong to think about that?
I guess rvm implode
also means rm -Rf /usr/share/rvm
(in one way or another).
I understand that any other structure would be a problem:
/usr/share/rvm
, /usr/share/rvm-static-files
rm -Rf /usr/share/rvm/this /usr/share/rvm/that /usr/share/rvm/the_other_thing /usr/share/rvm/and_the_other_other_thing
I would think "some way" of handling the above could be worth in order to not having to re-download everything (or to be able to explicitly inject).
In my case, I had a per-user installation, which appeared broken, so I tried to re-download rvm - to my surprise to find a "recommended installation for Ubuntu Focal" to be a mixed one. I thought I didn't need to clear the former to get the latter, but I ended up doing it anyway
In the process, lost all my rubies (unexpected, but not such a big problem) and gemsets (expected, but I'd rather that the rvm snapshot save
would somehow work).
Before the these, we run
rvm implode
inprerm
. Wondering ifrvm implode
is deleting rubies.To directly answer your implicit question, I don't know 😕 It sounds possible, since the
rvm implode
is also used for the "plain" uninstallation.
Yeap, you're right: this package install global rubies under /usr/share/rvm
, but local gemsets.
I'm not sure how to handle the removal without call rvm implode
(which will remove the rubies too).
Maybe I should've thought about it deeper.
While "mishandled", it doesn't seem that this would solve the issue (given that rvm implode
also means rm -Rf /usr/share/rvm
somehow)
Maybe we can, instead of rely on rvm implode
, check which steps it runs, and create a custom removal, keeping the rubies.
I am not sure if that would be your thing to do. Maybe it needs to be decided upstream.
@mpapis ^^?
https://github.com/rvm/ubuntu_rvm/blob/f6da3a5fb8753859a7458e56cc25ad289ec12e76/debian/postrm#L25-L27
This is why we have
apt-get purge
/apt-get remove --purge
.PS: I don't know what happens on
apt-get install --reinstall
.