[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#631572: linux-2.6: kconfig.py confuses unset (through a comment) with set to "no"



Package: linux-2.6
Severity: normal

debian/lib/python/debian_linux/kconfig.py considers that:
# CONFIG_EXAMPLE is not set

is equivalent to:
CONFIG_EXAMPLE=n

For example, if debian/config/kernelarch-x86/config contains:
# CONFIG_CRASH_DUMP is not set

and one adds to debian/config/config:
CONFIG_CRASH_DUMP=y

then a kernel built for x86 will NOT have CONFIG_CRASH_DUMP.

This behaviour is due to lines 59-61 in kconfig.py:
            elif line.startswith("# CONFIG_"):
                option = line[9:-11]
                self.set(option, 'n')

IMHO:
1) A comment shouldn't be parsed, except for "meta-comments", which
   should be well documented (as in, huge warning in the same file,
   like done with grub config wrapper).
2) Being "unset" is not the same as being set to no, and if taken into
   account (which looks unecessary) being set should have a higher prio.
3) This current behaviour is extremely counter-intuitive.

I'm worried by the amount of time I lost on this, and hope others won't :)

-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-238.9.1.el5.028stab089.1 (SMP w/8 CPU cores)
        (running in a container, please ignore)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



Reply to: