What you want is define def set_versioned_kernel_pkgs(real_versioned_kernel_pkgs): apt_pkg.config.clear("APT::VersionedKernelPackages") for k in real_versioned_kernel_pkgs: apt_pkg.config.set("APT::VersionedKernelPackages::", k)
and then use real_versioned_kernel_pkgs = apt.apt_pkg.config.value_list() set_versioned_kernel_pkgs(["linux-.*"]) self.addCleanup(lambda: set_versioned_kernel_pkgs(real_versioned_kernel_pkgs)) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1924809 Title: apt 2.0.5 in focal causes autopkgtest failures for update-manager To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1924809/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs