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

Migrate remaining jnius usage in Kolibri into kolibri-android-installer as a monkey patch #211

Open
Tracked by #197
rtibbles opened this issue Mar 21, 2024 · 0 comments

Comments

@rtibbles
Copy link
Member

rtibbles commented Mar 21, 2024

Currently Kolibri imports jnius in one place in order to get an accurate count of available disk space.

https://github.com/learningequality/kolibri/blob/8c7510342b2478c31ef26bb4d55514193f50f4b1/kolibri/utils/system.py#L149

This was necessary, due to permission restrictions introduced in Android 8 (see here: https://issuetracker.google.com/issues/37140047) and where it was introduced here: learningequality/kolibri#4158.

It seems that we probably still need to handle this properly, but doing so in a way that doesn't include a dependency on jnius in Kolibri will allow us to migrate to chaquopy more easily.

Therefore, we should remove this code from Kolibri, then do a monkey patch of shutil.disk_usage within the Android installer, that will do the appropriate call.

Once we have upgraded to chaquopy, we can then further test to see if the monkey patch is still needed.

@rtibbles rtibbles changed the title Migrate remaining jnius usage in Kolibri into kolibri-android-installer as a monkey patch on os.statfs Migrate remaining jnius usage in Kolibri into kolibri-android-installer as a monkey patch on os.statvfs Mar 30, 2024
@rtibbles rtibbles changed the title Migrate remaining jnius usage in Kolibri into kolibri-android-installer as a monkey patch on os.statvfs Migrate remaining jnius usage in Kolibri into kolibri-android-installer as a monkey patch Mar 30, 2024
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

1 participant