Comment 1 for bug 1924809

Revision history for this message
Julian Andres Klode (juliank) wrote :

Can confirm it's broken:

^['linux-.*'-5\.4\.0-72-generic$|^ 'kfreebsd-.*'-5\.4\.0-72-generic$|^ 'gnumach-.*'-5\.4\.0-72-generic$|^ '.*-modules'-5\.4\.0-72-generic$|^ '.*-kernel'-5\.4\.0-72-generic$|^ 'linux-.*'-5\.4\.0-72-generic$|^ 'kfreebsd-.*'-5\.4\.0-72-generic$|^ 'gnumach-.*'-5\
.4\.0-72-generic$|^ '.*-modules'-5\.4\.0-72-generic$|^ '.*-kernel'-5\.4\.0-72-generic$|^ 'linux-.*'-5\.4\.0-72-generic$|^ 'kfreebsd-.*'-5\.4\.0-72-generic$|^ 'gnumach-.*'-5\.4\.0-72-generic$|^ '.*-modules'-5\.4\.0-72-generic$|^ '.*-kernel']-5\.4\.0-72-generic$
23:03

Seems like the test is broken

APT::VersionedKernelPackages "['linux-.*', 'kfreebsd-.*', 'gnumach-.*', '.*-modules', '.*-kernel', 'linux-.*', 'kfreebsd-.*', 'gnumach-.*', '.*-modules', '.*-kernel', 'linux-.*', 'kfreebsd-.*', 'gnumach-.*', '.*-modules', '.*-kernel']";

This code sequence is wrong:

        # override the kernel autoremove regex
        real_versioned_kernel_pkgs = apt.apt_pkg.config.value_list(
            "APT::VersionedKernelPackages")
        apt.apt_pkg.config.set("APT::VersionedKernelPackages", "linux-.*")
        self.addCleanup(
            lambda: apt.apt_pkg.config.set("APT::VersionedKernelPackages",
                                           str(real_versioned_kernel_pkgs)))

It reads a list, then sets a value option instead of the list, and then after exit, overrides the value option with a string representation of the python list.