Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
opam caused a significant portion of my home directory to be deleted #3231
It's not entirely clear exactly what happened, as most of my files have been lost, and my programs corrupted, but I have the log from right before the problem occurred:
> opam init --no-setup --compiler=4.02.3 OPAM has already been initialized.Your system compiler has been changed. Do you want to upgrade your OPAM installation ? [Y/n] Y =-=- Upgrading system -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫 The following actions will be performed: ∗ install conf-gtksourceview 2 ∗ install camlp5 7.03 ∗ install conf-m4 1 ∗ install base-threads base ∗ install base-unix base ∗ install base-bigarray base ∗ install depext 1.0.5 ∗ install ocamlfind 1.7.3-1 ∗ install num 1.1 ∗ install lablgtk 2.18.6 ===== ∗ 10 ===== =-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫 [camlp5] Archive in cache [depext] Archive in cache [lablgtk] Archive in cache [num] Archive in cache [ocamlfind] Archive in cache =-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫 ∗ installed base-bigarray.base ∗ installed base-threads.base ∗ installed base-unix.base ∗ installed conf-m4.1 ∗ installed conf-gtksourceview.2 [ERROR] The compilation of camlp5 failed at "./configure --prefix ~/.opam/system -libdir ~/.opam/system/lib -mandir ~/.opam/system/man". ∗ installed depext.1.0.5 ∗ installed ocamlfind.1.7.3-1 [ERROR] The compilation of num failed at "make findlib-install". ∗ installed lablgtk.2.18.6 [ERROR] User interruption
I'm fairly sure it was executing
Okay, this seems to have been the issue: camlp5/camlp5#18
Edit: The dependency might be updated now? I'm not sure how to double-check. It's possible I was using a version that missed the fix by a day or so.
I am very sorry for this outcome, and feel for you. I am hoping you had backups or online versions of any valuable files
opam will only run commands within
Again, I am very sorry this happened to you
¹ We do have optional sandboxing, but it is still being tested and needs some manual configuration. The upcoming pam 2 can also automatically take care of package uninstallation.
referenced this issue
Feb 22, 2018
referenced this issue
Mar 5, 2018
Every file owned by my user account is gone from my system (~400G of data).
It seems opam will update/upgrade if you compiler version changes. I upgraded ocaml from 4.06.0 to 4.06.1 and it nuked my home directory. I am sad.