On Tue, Mar 27, 2018 at 11:46 PM, Steve Langasek <[email protected]> wrote: > Why does the update-manager upload include this code?: > > + running_kernel_version = subprocess.check_output( > + ["uname", "-r"], universal_newlines=True).rstrip() > + self.running_kernel_pkgs_regexp = re.compile("(" + "|".join( > + [("^" + p + ".*" + running_kernel_version) > + if not p.startswith(".*") else (running_kernel_version + p) > + for p in apt_versioned_kernel_pkgs]) + ")") > [...] > + if (pkg.is_auto_removable and > + (cache.versioned_kernel_pkgs_regexp and > + cache.versioned_kernel_pkgs_regexp.match(pkg.name) and > + not cache.running_kernel_pkgs_regexp.match(pkg.name))): > + kernel_autoremove_pkgs.append(pkg) > + pkg.mark_delete() > > apt already has an implementation in /etc/kernel/postinst.d/apt-auto- > removal which ensures that the currently-running kernel is not > autoremoved. Why are you duplicating this functionality in update- > manager?
The code in apt ensures that the kernel running at the time the last kernel was installed is not offered for autoremoval but it does not protect the _currently_ running kernel. The issue is tracked in LP: #1615381 and unattended-upgrades already uses the same method to protect the _current_ running kernel. The proper fix for LP: #1615381 would be too intrusive in apt for inclusion in Bionic at this stage of the cycle. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1675079 Title: 16.04 LTS Partition /boot fills up with Kernel images, gets underwear in a twist To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1675079/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
