Bug 119044 - Kudzu removes valid duplicate entries from modules.conf
Summary: Kudzu removes valid duplicate entries from modules.conf
Alias: None
Product: Fedora
Classification: Fedora
Component: kudzu
Version: 1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2004-03-24 09:29 UTC by Panu Matilainen
Modified: 2014-03-17 02:43 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2004-03-24 16:39:30 UTC

Attachments (Terms of Use)
Don't consider lines beginning with else and endif as duplicates (424 bytes, patch)
2004-03-24 09:33 UTC, Panu Matilainen
no flags Details | Diff

Description Panu Matilainen 2004-03-24 09:29:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040315

Description of problem:
If you have more than one if/else/endif constructs in modules.conf,
kudzu considers the else and endif lines as duplicates and removes
them, thus breaking the config.

The construc I noticed this with is this:
if -f /etc/modules.conf.d/*.conf
include /etc/modules.conf.d/*.conf
if -f /etc/modules.conf.d/`uname -r`/*.conf
include /etc/modules.conf.d/`uname -r`/*.conf

Version-Release number of selected component (if applicable):
0.99.65-1 - at least

How reproducible:

Steps to Reproduce:
1. Add the example construct in description to modules.conf
2. Run kudzu so that it detects new hardware and rewrites modules.conf


Actual Results:  The second endif disappears breaking modutils.

Expected Results:  The endif should stay there..

Additional info:

Also affects at least RHL 9 and RHEL 3. 

The new modutils in FC2-test doesn't support if-else-endif constructs
and based on a quick check isn't affected by this in any other way
either, but something to keep in mind for the future there too.

Comment 1 Panu Matilainen 2004-03-24 09:33:27 UTC
Created attachment 98820 [details]
Don't consider lines beginning with else and endif as duplicates

Very low priority since these type of constructs are rare so this is more FYI.
In any case this patch fixes the problem for me.

Comment 2 Bill Nottingham 2004-03-24 16:39:30 UTC
This almost certainly won't be fixed, as modprobe.conf doesn't support
conditionals, and that's where all the new development is.

Comment 3 Panu Matilainen 2004-03-24 17:00:15 UTC
Yup, wasn't expecting this to be fixed, reported just to
1) have data available about existence of such an issue
2) point out that checking if similar issue can happen in the new
modprobe.conf format (yes I know it doesn't support conditionals but
just perhaps some other option/command) wouldn't hurt

Note You need to log in before you can comment on or make changes to this bug.