[Bug 2037471] Re: ubuntustudio-lowlatency-settings fails to upgrade 23.04 -> 23.10
Steve Langasek
2037471 at bugs.launchpad.net
Tue Sep 26 23:26:57 UTC 2023
Preparing to unpack .../13-grub2-common_2.12~rc1-4ubuntu3_amd64.deb ...
Unpacking grub2-common (2.12~rc1-4ubuntu3) over (2.06-2ubuntu16) ...
[...]
Preparing to unpack .../19-grub-common_2.12~rc1-4ubuntu3_amd64.deb ...
Unpacking grub-common (2.12~rc1-4ubuntu3) over (2.06-2ubuntu16) ...
[...]
Preparing to unpack .../44-ubuntustudio-lowlatency-settings_23.10.13_all.deb ...
/var/lib/dpkg/tmp.ci/preinst: 2: set-e: not found
Unpacking ubuntustudio-lowlatency-settings (23.10.13) over (23.04.25) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/10_linux: 1: version_find_latest: not found
dpkg: warning: old ubuntustudio-lowlatency-settings package post-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/10_linux: 1: version_find_latest: not found
dpkg: error processing archive /tmp/apt-dpkg-install-Vg6LvA/44-ubuntustudio-lowlatency-settings_23.10.13_all.deb (--unpack):
new ubuntustudio-lowlatency-settings package post-removal script subprocess returned error exit status 127
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/10_linux: 1: version_find_latest: not found
dpkg: error while cleaning up:
new ubuntustudio-lowlatency-settings package post-removal script subprocess returned error exit status 127
[...]
So the issue here is:
- New versions of grub2-common and grub-common are unpacked but not configured
- Because /etc/grub.d/10_linux is a conffile, the old version from grub-common 2.06-2ubuntu16 is still on disk, which is not compatible with the /usr/share/grub/grub-mkconfig_lib from grub-common 2.12~rc1
- ubuntustudio-lowlatency-settings attempts to call update-grub in the postrm of the old version of the package. This is called as "old-postrm upgrade 23.10.13" after the new package has been unpacked and the new preinst script has been run.
- this fails because /etc/grub.d is not in a consistent state
- as a fallback, "new-postrm failed-upgrade 23.04.25 23.10.13" is called. This again fails because /etc/grub.d is not in a consistent state.
Debian Policy 6.5 says that the "postrm upgrade" must gracefully skip
actions requiring its dependencies, because they may be unavailable.
However, the old version doesn't depend on grub anyway so that's not
relevant.
Policy further says that "postrm failed-upgrade" can only rely on pre-
dependencies having been configured *at some point previously* but that
at the time this script is called they may be in state "unpacked" or
"half-configured". That's exactly the state we're in when this fails.
So a Pre-Depends, usually discouraged as too aggressive, in this case is
*insufficient* to ensure that there are no failures on upgrade. Even,
as I understand it, if we use a versioned pre-depends; because policy
allows the pre-dependency to have been previously configured and now be
in unpacked state.
My reading of policy is that this needs to be fixed by amending
debian/ubuntustudio-lowlatency-settings.postrm rather than by adding a
pre-dependency.
--
You received this bug notification because you are a member of Ubuntu
Studio Development, which is subscribed to ubuntustudio-default-settings
in Ubuntu.
https://bugs.launchpad.net/bugs/2037471
Title:
ubuntustudio-lowlatency-settings fails to upgrade 23.04 -> 23.10
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntustudio-default-settings/+bug/2037471/+subscriptions
More information about the Ubuntu-reviews
mailing list