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

Prefer apt install since 16.04 #174

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

benjaoming
Copy link
Contributor

@benjaoming benjaoming commented May 4, 2020

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 benjaoming self-assigned this May 4, 2020
@benjaoming
Copy link
Contributor Author

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

@benjaoming benjaoming marked this pull request as ready for review May 5, 2020 15:27
@radinamatic
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Member

jredrejo commented May 7, 2020

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 -i is a way to install a deb existing in your system, they have different purposes

@benjaoming
Copy link
Contributor Author

benjaoming commented May 7, 2020

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

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

Successfully merging this pull request may close these issues.

3 participants