klange / toaruos

A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
https://toaruos.org/
University of Illinois/NCSA Open Source License
6.03k stars 475 forks source link

Package Manager offline fallback #248

Open Bellisario opened 1 year ago

Bellisario commented 1 year ago

Adding a simple screen message saying "You're offline" would help if someone opens Package Manager and is offline... Maybe could also be made with simple HTML, as the help page.

Current behavior: image

klange commented 1 year ago

The default package manager config does actually have an offline fallback set up, to load a manifest from the CD, but that manifest has been gone for a while. There are four "remotes" currently specified: the CD, a NAT IP address on my local network, the newer DigitalOcean CDN, and the original toaruos.org repository as a fallback.

The CLI does present a message when a manifest fails to load, which regularly prints for the local fallback. I don't want to turn that message into a dialog box for the GUI directly, specifically because of that NAT address case, but it would make sense to catch the case where no repository works and present a message box for that.

klange commented 1 year ago

I added a simple dialog box when no packages are available in da7651cec618447c827553a42a4d4bdaffd66937, though I'd like to do something a bit smarter and actually inform about failing repositories, so I'll keep this issue open for now.

Screenshot from 2022-08-18 07-23-07