Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Official PPA is badly designed #2451

Closed
Ypnose opened this issue Mar 1, 2016 · 7 comments
Closed

Official PPA is badly designed #2451

Ypnose opened this issue Mar 1, 2016 · 7 comments

Comments

@Ypnose
Copy link

Ypnose commented Mar 1, 2016

Good evening,
Adding your PPA on an Ubuntu Trusty (14.04) machine force the users to remove all other packages depending on ocaml, due to your bumped version (4.02.1). For example, coq and therefore ocaml were installed from the official repositories. Installing the "shiny" opam-1.2.2 purges everything else (coq and his ocaml dep).
I even wonder if you tested your setup in a true production environment, because this is totally harmful, unacceptable and unprofessional. I've always considered PPA are dirty, and yours follows the general rule. Fortunately, I tested it before deploying it on the 100+ machines. I also tested your pinned revisions, but a few dependencies are missing.
Do you plan to build opam with the ocaml provided by Ubuntu maintainers? You could also create another ocaml package (+ the deps), with a different name. This way, you won't break critical workstations.

@Ypnose
Copy link
Author

Ypnose commented Mar 2, 2016

A demonstration on a fresh Trusty, inside a VM:

$ dpkg -l | egrep '(coq|ocaml)'
ii  coq                  8.4pl3dfsg-1       amd64    proof assistant for higher-order logic (toplevel and compiler)
ii  coq-theories         8.4pl3dfsg-1       all      proof assistant for higher-order logic (theories)
ii  coqide               8.4pl3dfsg-1       amd64    proof assistant for higher-order logic (gtk interface)
ii  libcoq-ocaml         8.4pl3dfsg-1       amd64    runtime libraries for Coq
ii  liblablgtk2-ocaml    2.16.0+dfsg-1      amd64    runtime libraries for OCaml bindings for GTK+ version 2
ii  ocaml-base-nox       4.01.0-3ubuntu3    amd64    Runtime system for OCaml bytecode executables (no X)

After adding the PPA like it's described on the official website, the first thing that I notice:

$ apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  ocaml-base-nox
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

It's the same with dist-upgrade… Indeed coq needs the 4.01.0-3ubuntu3 version. Let's install opam from the PPA:

$ apt-get install opam
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  enchant fontconfig fontconfig-config fonts-dejavu-core hicolor-icon-theme
  hunspell-en-us libatk1.0-0 libatk1.0-data libavahi-client3
  libavahi-common-data libavahi-common3 libcairo2 libcups2 libdatrie1
  libenchant1c2a libfontconfig1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common
  libglade2-0 libgraphite2-3 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
  libgtkspell0 libharfbuzz0b libhunspell-1.3-0 libjasper1 libjbig0
  libjpeg-turbo8 libjpeg8 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0
  libpixman-1-0 libthai-data libthai0 libtiff5 libxcb-render0 libxcb-shm0
  libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1
  libxrandr2 libxrender1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  aspcud binutils camlp4 camlp4-extra clasp cpp cpp-4.8 gcc gcc-4.8 git
  git-man gringo libasan0 libatomic1 libc-dev-bin libc6-dev libcloog-isl4
  liberror-perl libgcc-4.8-dev libgmp10 libgomp1 libisl10 libitm1 liblua5.1-0
  libmpc3 libmpfr4 libncurses5-dev libpython2.7 libquadmath0 libtbb2
  libtinfo-dev libtsan0 linux-libc-dev manpages-dev ocaml-base-nox
  ocaml-compiler-libs ocaml-interp ocaml-native-compilers ocaml-nox opam-docs
  patch unzip
Suggested packages:
  binutils-doc potassco-guide cpp-doc gcc-4.8-locales gcc-multilib make
  autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.8-multilib
  gcc-4.8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg
  libtsan0-dbg libquadmath0-dbg git-daemon-run git-daemon-sysvinit git-doc
  git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki
  git-svn glibc-doc ncurses-doc ocaml-doc tuareg-mode ocaml-mode diffutils-doc
  zip
Recommended packages:
  ledit readline-editor
The following packages will be REMOVED:
  coq coq-theories coqide libcoq-ocaml liblablgtk2-ocaml
The following NEW packages will be installed:
  aspcud binutils camlp4 camlp4-extra clasp cpp cpp-4.8 gcc gcc-4.8 git
  git-man gringo libasan0 libatomic1 libc-dev-bin libc6-dev libcloog-isl4
  liberror-perl libgcc-4.8-dev libgmp10 libgomp1 libisl10 libitm1 liblua5.1-0
  libmpc3 libmpfr4 libncurses5-dev libpython2.7 libquadmath0 libtbb2
  libtinfo-dev libtsan0 linux-libc-dev manpages-dev ocaml-compiler-libs
  ocaml-interp ocaml-native-compilers ocaml-nox opam opam-docs patch unzip
The following packages will be upgraded:
  ocaml-base-nox
1 upgraded, 42 newly installed, 5 to remove and 0 not upgraded.
Need to get 62.0 MB of archives.
After this operation, 156 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Here coq will be removed. Now, let's remove the unused coq dependencies:

$ apt-get autoremove --purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  enchant fontconfig fontconfig-config fonts-dejavu-core hicolor-icon-theme
  hunspell-en-us libatk1.0-0 libatk1.0-data libavahi-client3
  libavahi-common-data libavahi-common3 libcairo2 libcups2 libdatrie1
  libenchant1c2a libfontconfig1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common
  libglade2-0 libgraphite2-3 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
  libgtkspell0 libharfbuzz0b libhunspell-1.3-0 libjasper1 libjbig0
  libjpeg-turbo8 libjpeg8 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0
  libpixman-1-0 libthai-data libthai0 libtiff5 libxcb-render0 libxcb-shm0
  libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1
  libxrandr2 libxrender1
0 upgraded, 0 newly installed, 47 to remove and 0 not upgraded.
After this operation, 24.0 MB disk space will be freed.
Do you want to continue? [Y/n]

Assuming I want to reinstall coq:

$ apt-get install coq
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 coq : Depends: libcoq-ocaml-g3g57
       Depends: ocaml-base-nox-4.01.0
       Recommends: coqide but it is not going to be installed or
                   proofgeneral but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

or any other ocaml-dependent package:

$ apt-get install ledit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ledit : Depends: ocaml-base-nox-4.01.0
E: Unable to correct problems, you have held broken packages.

YEAH! 👍 The system is broken. Restoring a correct state takes 20 minutes.

@avsm
Copy link
Member

avsm commented Mar 2, 2016

Mixing and matching binary packages sadly doesn't work very well with the PPA model. The OPAM PPA exists to get OPAM on the system, and from there you should be able to bootstrap Coq via:

opam init
opam switch 4.02.3
opam install coq
eval `opam config env`

@Ypnose
Copy link
Author

Ypnose commented Mar 2, 2016

I see. Sadly, users will never proceed this way. They expect coq to be already ready-to-run. opam-1.1 was previously installed and running opam init https://opam.ocaml.org/1.1 is already an insurmountable task…
You could also consider the advice I gave you: do not use same packages names for the deps.

@Ypnose
Copy link
Author

Ypnose commented Mar 8, 2016

This issue was reported one week ago and so far, the only answer was a bit "short". Is there a way to get a more "verbose" feedback from devs (assuming you want to improve / fix it)?

@AltGr
Copy link
Member

AltGr commented Mar 11, 2016

Although detailed reports like yours are appreciated, and I can understand your frustration, the tone of your original message didn't really drive the desire to be helpful.
I am not very invested into the Ubuntu packaging; but indeed, the opam package should probably be made not to depend on a specific version of OCaml (OCaml doesn't even need to be a hard dependency), which would avoid your issue with stock dependent packages becoming unavailable.

@Ypnose
Copy link
Author

Ypnose commented Mar 15, 2016

Thank you for your answer. To show you my goodwill (I'm not only a whiny fool), I'm ready to test and write reports (if necessary) once further changes are done.

@Ypnose
Copy link
Author

Ypnose commented Aug 30, 2016

What is the current status for this issue? Do you plan to release a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants