pop-os / default-settings

Distribution Default Settings
Other
44 stars 16 forks source link

fix: Opt out of phased updates Focal #167

Closed n3m0-22 closed 1 year ago

n3m0-22 commented 1 year ago

Phased updates messages have started showing up in Focal.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
#
# "Phased updates" allow careful rollout of deb package changes at scale.
# You may see these as packages that have been "kept back". Learn more at
# https://ubuntu.com/server/docs/about-apt-upgrade-and-phased-updates
#
The following packages have been kept back:
  fwupd-signed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

This is an addition of the original fix for Jammy. https://github.com/pop-os/default-settings/pull/153 https://github.com/pop-os/default-settings/pull/166

This works for fresh installs. Otherwise sudo dpkg-reconfigure pop-default-settings needs to be run after adding this PR.

It will still suffer from the issue pointed out by @jacobgkau https://github.com/pop-os/default-settings/pull/166#issuecomment-1478390144, but it will at least put Jammy and Focal on equal footing in regards to this issue.

leviport commented 1 year ago

I don't think it worked: 2023-03-06_17-23-44

leviport commented 1 year ago

@ahoneybun did you see https://github.com/pop-os/default-settings/pull/153 ?

leviport commented 1 year ago

I might need to wait a bit longer for the cron job to run, but I still got the phased updates message after installing this update and rebooting: 2023-03-07_17-24-03

I'd also like an engineering opinion on whether this is the kind of fix we'd be happy with.

jackpot51 commented 1 year ago

I expected this to work because it matches the jammy change. I would want the same thing on focal, once it works.

n3m0-22 commented 1 year ago

My reasoning for going beyond what was done for Jammy is that in Focal while APT::Get::Always-Include-Phased-Updates "true"; does seem to opt out of phased updates it does not suppress the message from Ubuntu when running apt upgrade.

My concern with this is that users will still be seeing a message about phased updates with a link to Ubuntu server docs https://ubuntu.com/server/docs/about-apt-upgrade-and-phased-updates.

I do see a difference in the version of apt that may be part of the problem (i.e., Jammy apt is 2.4.8, Focal apt is 2.0.6).

I also noticed that in /etc/apt/apt.conf.d on Jammy there is no file 20apt-esm-hook.conf, but there is on Focal. If this file is deleted or it's contents commented out on Focal the message does go away. Maybe removing this file on Focal is a more acceptable solution.

If this message showing is not of concern I can remove the second commit, and it should still opt out the user.

13r0ck commented 1 year ago

but ubuntu-advantage-tools is now providing

Man we really need to improve our metapackaing to remove that package

n3m0-22 commented 1 year ago

but ubuntu-advantage-tools is now providing

Man we really need to improve our metapackaing to remove that package

If removing the package completely is ok I can confirm from my testing that solves the issue as well.

n3m0-22 commented 1 year ago

Rather than running everytime the system boots, this should just be in https://github.com/pop-os/default-settings/blob/master_jammy/usr/bin/pop-app-folders

And run pro config unset apt_news once

I had thought about doing that, but I was worried an update to ubuntu-advantage-tools might reset the change. Although I suppose an update could also make this fix invalid anyway.

n3m0-22 commented 1 year ago

On a fresh install of Pop 20.04, with or without the changes in this PR, I'm no longer seeing any messages about phased updates. Checking pro config show I'm seeing apt_news set to true. This PR may no longer be necessary, but that will need to be double checked.

n3m0-22 commented 1 year ago

I'm closing this for now as it is not working. I will reopen if the issues presents itself again.