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

Install PackageKit based Operating System Updates as Offline Updates #1943

Merged
merged 28 commits into from
Dec 27, 2022

Conversation

meisenzahl
Copy link
Member

No description provided.

@meisenzahl meisenzahl changed the title Install deb based Operating System Updates as Offline Updates Install PackageKit based Operating System Updates as Offline Updates Oct 31, 2022
@danirabbit
Copy link
Member

Alright, so I thinking about this, probably the smallest change to the UI would be to add another header that's like "Waiting to Install" or something and list the apps there that have been downloaded but not installed yet and on the header have a button "Restart and Install" similar to how we have the "Update All" button.

And then I think we probably need to change the labels on the buttons for non-flatpak packages from "Update" to "Download" so that it's more clear which ones will be installed immediately and which ones will be installed after restarting.

And then from there I think we can iterate on doing a more complicated redesign after the feature lands, but that sounds to me like the smallest change to make it usable. What do you think?

@meisenzahl meisenzahl mentioned this pull request Dec 20, 2022
@meisenzahl
Copy link
Member Author

All packages provided by PackageKit are grouped as "Operating System Updates". The button label is changed to "Download". If the packages are downloaded and prepared for update on next boot by PackageKit a info is shown that "A restart is required to finish installing updates". This was accomplished by extending existing logic.

Peek.2022-12-21.14-52.mp4

After you prepared "Operating System Updates", closed and opened AppCenter again, the info is shown again that a restart is required.

If you restart your device the packages will be installed during boot like shown here by the early Operating Upgrade Protoype: https://youtu.be/RRN05MwFJ5Y?t=415

@meisenzahl meisenzahl marked this pull request as ready for review December 21, 2022 14:29
@meisenzahl
Copy link
Member Author

@danirabbit I would love to get feedback from you.

A few more things you could look out for in the review:

  1. when applying the updates during the boot process, a progress bar with a percentage value is shown on my device, but no status text in the middle of the display. This worked under OS 6 on my device. (see the video of the upgrade prototype) Is this also the case for you? If so, we may need to update/patch Plymouth.

  2. BackendAggregator.get_prepared_applications () returns a list of prepared packages. Currently, we do not use the list. Would you like to show more information about the prepared packages with a follow-up PR? If not, I could probably remove the unused functions.

@danirabbit
Copy link
Member

As far as I can tell this worked exactly as expected, nice job!

I can confirm that there's no label like "Installing Updates" on the plymouth screen. It looks like the patch we used in Focal was built for Jammy, so I can make sure that gets done: elementary/os-patches#240

I think in a future branch we should probably rework that OS Updates page not to use an AppInfoView so we can do something more appropriate like GNOME Software with the list of additions/removals/upgrades, but I agree that can wait for another branch

@meisenzahl meisenzahl force-pushed the packagekit-offline-updates branch from 0c03516 to 94e2327 Compare December 22, 2022 09:57
@meisenzahl
Copy link
Member Author

My bad, so actually we need the changes I tried to remove in 94e2327.

These are responsible for checking to see if packages are ready for an update, if they are, it will indicate that a reboot is necessary.

Currently we do not use the returned list of packages. However, it should be very useful for follow-up PRs.

@danirabbit
Copy link
Member

I'm building Plymouth now, it looks like we carried a patch last release to set fonts, so I bet the text didn't show because we're missing the Ubuntu font: https://code.launchpad.net/~elementary-os/+recipe/plymouth-jammy

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue I discovered here is that if I click "Download" and let that finish, then either close AppCenter and reopen it, or click the "Check for Updates" menuitem, the Operating system updates row will appear again with the download button and the Restart infobar will disappear even though we've already downloaded those updates

@meisenzahl
Copy link
Member Author

@danirabbit thanks for your review.

PackageKit deletes all information about offline update actions and prepared updates (stored in /var/lib/PackageKit/) if a refresh of it's cache is triggered. 6d4065d prevents a refresh of the cache if prepared updates are available.

"Download" ⟶ "Check for Updates"

Peek.2022-12-23.08-54.mp4

"Download" ⟶ Reopen AppCenter

Peek.2022-12-23.08-55.mp4

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I say we go ahead and get this in so we can keep iterating on it and get wider testing etc :)

@danirabbit danirabbit merged commit 73ac7e6 into master Dec 27, 2022
@danirabbit danirabbit deleted the packagekit-offline-updates branch December 27, 2022 22:42
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