Skip to content

feat: Keep gnome-online-accounts-gtk when removing GNOME #354

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jacobgkau
Copy link
Member

Fixes #353.

@jacobgkau
Copy link
Member Author

This appears to be working. gnome-online-accounts-gtk+ (with the + at the end) tells apt to keep that package installed. gnome-control-center now needs to be explicitly added to the removal list, since gnome-online-accounts otherwise keeps it as a recommends (it's not actually needed, as gnome-online-accounts-gtk is an alternative to that recommends).

@jacobgkau jacobgkau marked this pull request as ready for review May 13, 2025 10:06
@jacobgkau jacobgkau requested review from a team May 13, 2025 10:06
@jacobgkau
Copy link
Member Author

jacobgkau commented May 13, 2025

Discovered this doesn't work if the internet is disconnected after downloading the upgrade but before the "offline" (rebooted) portion of the upgrade occurs. This is because gnome-online-accounts-gtk is a new package with 24.04 (it's not even available in the 22.04 repos), and while I assumed it was downloaded in advance as a dependency of gnome-control-center or gnome-online-accounts, it's actually not (instead, it was downloaded on demand when this command was run by pop-upgrade). The upgrade doesn't fail, but instead the Removing GNOME... step of the offline upgrade was skipped if the package couldn't be downloaded at that time. To fix this, just need to ensure that package is downloaded by pop-upgrade in advance with the rest of the new packages.

@jacobgkau jacobgkau marked this pull request as draft May 13, 2025 17:49
Allows downloading packages for the new release that were not
previously installed (and would not otherwise have been installed),
before rebooting into the offline portion of the upgrade.
@jacobgkau
Copy link
Member Author

Getting an error regarding the apt install --print-uris command with 4b0bdeb.

@jacobgkau
Copy link
Member Author

On trying this again today, it seems to be working in a fresh VM:

Screenshot_2025-06-03_13-20-45

After completing the upgrade, Online Accounts is installed, but GNOME Shell and GNOME Control Center are no longer installed, as expected. This works even if internet is removed after downloading and before rebooting to install the upgrade.

However, I still got the error again in the VM that gave that error last time:

Screenshot_2025-06-03_14-23-48

Attempting to replicate the issue manually (by updating the source lists to noble and running sudo apt full-upgrade --print-uris followed by sudo apt --print-uris install gnome-online-accounts-gtk), the package resolver's complaining about an unrelated pop-desktop package dependency that will be solved by the full-upgrade but would not be solved by the install command alone.

Screenshot_2025-06-03_14-33-01

If I change the install command to download, then it prints the URI successfully, since that one doesn't try to resolve the rest of the system's dependencies. I'll try to figure out how to have this usage of the apt_fetch function do that instead, while still having it get dependencies for its usage earlier in the process.

@jacobgkau
Copy link
Member Author

jacobgkau commented Jun 4, 2025

Apparently apt-get --print-uris install displays MD5 checksums, but apt-get --print-uris download displays SHA512 instead... even though its manpage only says --print-uris displays MD5.

@jacobgkau jacobgkau force-pushed the online-accounts branch 2 times, most recently from 6607e41 to 4cd4673 Compare June 18, 2025 03:53
@jacobgkau
Copy link
Member Author

This seems to be working now! gnome-online-accounts-gtk is fetched at the end of pop-upgrade's download process:

Screenshot_2025-06-18_02-21-16

After disconnecting the VM's network adapter and rebooting into the offline portion of the upgrade, the upgrade completes as expected. On 24.04, gnome-online-accounts-gtk is present as expected and opens up successfully (also tested adding & removing a Google account successfully), while other GNOME components such as gnome-shell and gnome-control-center are no longer present.

We need to get pop-os/apt-cmd#10 merged first now that we know that part's working (and make a release of that), then point pop-upgrade's Cargo.toml back to a normal release of the crate. Also want to do a little more testing to make sure the changes here in pop-upgrade don't have any hidden side effects.

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.

Keep gnome-online-accounts-gtk on upgrades
1 participant