Skip to content

improve ota updates#13888

Merged
Frenzie merged 4 commits into
koreader:masterfrom
benoit-pierre:pr/improve_ota_updates
Jun 24, 2025
Merged

improve ota updates#13888
Frenzie merged 4 commits into
koreader:masterfrom
benoit-pierre:pr/improve_ota_updates

Conversation

@benoit-pierre

@benoit-pierre benoit-pierre commented May 29, 2025

Copy link
Copy Markdown
Member

Increase re-use:

  • use the latest stable release tag date for all files modification time (which does change Version:getBuildDate() for nightlies)
  • tweak tar command tar to ignore read-errors (so missing files don't result in a failure to create the installation archive): no point in trashing the archive, especially considering the fact that if the OTA update was canceled, a subsequent attempt would re-use that (potentially incomplete) archive

Comparison:

Default:

re-used / fetched v2025.04-67 v2025.04-68 v2025.04-72 v2025.04-74
v2025.04 66.5 % / 25.5 MB 66.3 % / 25.5 MB 65.1 % / 25.5 MB 64.2 % / 25.6 MB
v2025.04-67 97.6 % / 17.5 MB 95.5 % / 17.5 MB 90.4 % / 17.5 MB
v2025.04-68 95.6 % / 17.5 MB 90.5 % / 17.5 MB
v2025.04-72 92.3 % / 17.5 MB

With --mtime=2025-04-09 --numeric-owner:

re-used / fetched v2025.04-67 v2025.04-68 v2025.04-72 v2025.04-74
v2025.04 68.2 % / 21.0 MB 68.0 % / 21.0 MB 66.8 % / 21.2 MB 65.8 % / 21.2 MB
v2025.04-67 99.7 % / 8.4 MB 97.5 % / 8.8 MB 92.4 % / 9.2 MB
v2025.04-68 97.7 % / 8.6 MB 92.6 % / 8.9 MB
v2025.04-72 94.3 % / 8.6 MB

This change is Reviewable

@benoit-pierre benoit-pierre requested a review from Frenzie as a code owner May 29, 2025 22:28
@benoit-pierre

Copy link
Copy Markdown
Member Author

Speaking about OTAs, if I decide I don't want to install an update now, then I end up deadlocked on the "The update will be applied the next time KOReader is started." popup, presumably because it's created as not dismissable too?

Device:install implementation:

function Device:install()
    local ConfirmBox = require("ui/widget/confirmbox")
    UIManager:show(ConfirmBox:new{
        text = _("Update is ready. Install it now?"),
        ok_text = _("Install"),
        ok_callback = function()
            local save_quit = function()
                self:saveSettings()
                UIManager:quit(85)
            end
            UIManager:broadcastEvent(Event:new("Exit", save_quit))
        end,
        cancel_text = _("Later"),
        cancel_callback = function()
            local InfoMessage = require("ui/widget/infomessage")
            UIManager:show(InfoMessage:new{
                text = _("The update will be applied the next time KOReader is started."),
                unmovable = true,
                dismissable = false,
            })
        end,
        unmovable = true,
        dismissable = false,
    })
end

@Frenzie

Frenzie commented May 30, 2025

Copy link
Copy Markdown
Member

That looks like a small mistake in #12676.

Edit: fixed in #13889.

Add `--numeric-owner` for a very minor size reduction.
- use the latest stable release tag date for all files modification time
- tweak tar command tar to ignore read-errors (so missing files don't
  result in a failure to create the installation archive)
@benoit-pierre benoit-pierre force-pushed the pr/improve_ota_updates branch from 8042941 to 29b81f1 Compare June 24, 2025 17:14
@Frenzie Frenzie merged commit 633e5c8 into koreader:master Jun 24, 2025
4 checks passed
@Frenzie Frenzie added this to the 2025.06 milestone Jun 24, 2025
@benoit-pierre benoit-pierre deleted the pr/improve_ota_updates branch June 24, 2025 18:29
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

Successfully merging this pull request may close these issues.

2 participants