learningequality / kolibri-docs

Kolibri Learning Platform documentation
https://kolibri.readthedocs.io/
11 stars 29 forks source link

Prefer `apt install` since 16.04 #174

Open benjaoming opened 4 years ago

benjaoming commented 4 years ago

Learned that apt install also works on .deb files since 16.04 and will install dependencies as well. Since we recommend python3-cryptography, this change could potentially ensure that people don't miss out on it.

~I need to make a test to see what happens when someone is offline and does not have python3-cryptography~ Tested: It will fail unless --fix-missing is added.

I added a tip box in the docs. I think this is the only place where we currently have information about why this package is a dependency. Installing Kolibri as a portable .deb can be a nice experience, just this little tip became more important since 20.04 runs Python 3.8 and won't benefit from bundled C extensions (cext).

image

benjaoming commented 4 years ago

This isn't optimal, but having apt install --fix-missing ./kolibri.deb command seems like the best choice: It will try to install python3-cryptography but gracefully timeout for DNS resolution of online repositories.

Using dpkg -i kolibri.deb will not fetch the dependency no matter what.

Important to note that apt install ./kolibri.deb will fail in an offline environment without either python3-cryptography already installed or --fix-missing:

VirtualBox_Ubuntu 20 04 server_05_05_2020_15_58_09

radinamatic commented 4 years ago

If I understand correctly apt install --fix-missing is supposed to work offline the same as dpkg -i, correct? And python3-cryptography is not necessary?

benjaoming commented 4 years ago

And python3-cryptography is not necessary?

50% of the installer footprint size comes from bundling this dependency. I treat it as a decision that this is a highly desired dependency.

I think the "tip box" is now more important because 0.13 doesn't have cryptography in 20.04 and other Py 3.8 environments unless it's installed. So if someone is doing a portable installation, I think they should be informed to bring it with them... but okay it IS optional, so if this isn't clear enough, we shouldn't make people confused in a way that they give up. I hope the "tip" aspect makes it seem non-mandatory.

jredrejo commented 4 years ago

If I understand correctly apt install --fix-missing is supposed to work offline the same as dpkg -i, correct?

No, apt install -f might require internet, it's a way to fix a dependency problem. dpkg -iis a way to install a deb existing in your system, they have different purposes

benjaoming commented 4 years ago

Yes, in addition to @jredrejo's correct point, apt install --fix-missing will gracefully handle network connection failure for soft dependencies.