Bug 53715

Summary: cannot read kernel configuration files for 2.4.19 and 2.4.20 kernels
Product: kcontrol Reporter: spikethehobbitmage
Component: kcmlinuzAssignee: Malte Starostik <malte>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description spikethehobbitmage 2003-01-31 06:39:20 UTC
Version:           2.0 (using KDE 3.1.0)
Installed from:     (3.0)
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i586) release 2.4.18-k6.6

this occurs for both 2.4.19 and 2.4.20 kernels, but does not occur for 2.4.18
this also occured in KDE 3.0.5
this report is for 2.4.20.  2.4.19 is the same except line number is 57
---
The kernel configuration could not be read due to the following errors: 
/usr/src/linux/net/ipv4/netfilter/Config.in, line 66:
if [ "$CONFIG_IP_NF_IRC" = "y" ] && [ "$CONFIG_IP_NF_NAT" = "y" ]; then
^ unrecognized character (under the second &, first & is red)

/usr/src/linux/net/ipv4/netfilter/Config.in, line 66:
if [ "$CONFIG_IP_NF_IRC" = "y" ] && [ "$CONFIG_IP_NF_NAT" = "y" ]; then
^ parse error (also under the second &, again first & is red)

Either your kernel sources contain invalid configuration rules or you just found a bug in the KDE Kernel Configurator.
---

complete diff of original 2.4.20 Config.in file and the Debian (2.4.20-5) version
66,67c66,67
<         if [ "$CONFIG_IP_NF_IRC" = "y" ]; then
<           define_tristate CONFIG_IP_NF_NAT_IRC $CONFIG_IP_NF_NAT
---
>         if [ "$CONFIG_IP_NF_IRC" = "y" ] && [ "$CONFIG_IP_NF_NAT" = "y" ]; then
>           define_tristate CONFIG_IP_NF_NAT_IRC y
75,76c75,76
<         if [ "$CONFIG_IP_NF_FTP" = "y" ]; then
<           define_tristate CONFIG_IP_NF_NAT_FTP $CONFIG_IP_NF_NAT
---
>         if [ "$CONFIG_IP_NF_FTP" = "y" ] && [ "$CONFIG_IP_NF_NAT" = "y" ]; then
>           define_tristate CONFIG_IP_NF_NAT_FTP y
Comment 1 George Staikos 2003-02-12 00:49:16 UTC
To my knowledge this is incorrect form.  However, I'll look at fixing it.  Proper form is to 
use -o. 
 
(and I have never seen this construct in a kernel, but I'm looking at fixing it as you 
show) 
Comment 2 George Staikos 2003-02-12 01:06:00 UTC
Subject: KDE_3_1_BRANCH: kdeadmin/kcmlinuz

CVS commit by staikos: 

CCMAIL: 53715-done@bugs.kde.org

Parse if [ foo ] && [bar] || [baz]  etc.  It's not ENTIRELY correct in
that it will also allow  if [ foo ] -o [ bar]   and
if [ foo && bar ]

But who knows... maybe it will be allowed one day too.


  M +239 -212  grammar.cpp   1.10.4.2
  M +21 -9     grammar.y   1.11.4.2
  M +255 -246  lexer.cpp   1.11.4.1
  M +3 -1      lexer.l   1.7.4.1