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?
Why does the update-manager upload include this code?:
+ running_ kernel_ version = subprocess. check_output( newlines= True).rstrip( ) kernel_ pkgs_regexp = re.compile("(" + "|".join( kernel_ version) kernel_ version + p) kernel_ pkgs]) + ")") auto_removable and versioned_ kernel_ pkgs_regexp and _kernel_ pkgs_regexp. match(pkg. name) and kernel_ pkgs_regexp. match(pkg. name))) : autoremove_ pkgs.append( pkg)
+ ["uname", "-r"], universal_
+ self.running_
+ [("^" + p + ".*" + running_
+ if not p.startswith(".*") else (running_
+ for p in apt_versioned_
[...]
+ if (pkg.is_
+ (cache.
+ cache.versioned
+ not cache.running_
+ kernel_
+ 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?