Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373808 - sys-apps/openrc-0.8.2-r1: ignores entries in /etc/conf.d/modules w/o kernel version
Summary: sys-apps/openrc-0.8.2-r1: ignores entries in /etc/conf.d/modules w/o kernel v...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
: 379667 (view as bug list)
Depends on:
Blocks: 374183
  Show dependency tree
 
Reported: 2011-07-02 12:43 UTC by Toralf Förster
Modified: 2011-08-21 19:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
log output (log.txt,6.82 KB, text/plain)
2011-07-03 17:50 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2011-07-02 12:43:33 UTC
While testing kernel 3.0 I removed the _2_6 version string for acpi-cpufreq module), but that doesn't work (neither under 3.0 nor under 2.6.39.2)

n22 /etc/local.d # grep -v '#' /etc/conf.d/modules  | grep -v '^$'
modules="${modules} acpi-cpufreq"
module_acpi_cpufreq_args=""
modules_2_6="${modules_2_6} fbcon"
module_fbcon_args_2_6=""

(BTW a big fat red blinking bell ringing "eselect news" message would help to remember people to inspect that file) 

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2011-07-03 16:33:38 UTC
if you have "modules_2_6", then "modules" wont be read for 2.6.x kernels.  this is by design ... variables do not accumulate; only the most exact gets read.

run `/etc/init.d/modules --debug start` and post the log as an attachment.
Comment 2 Toralf Förster gentoo-dev 2011-07-03 17:50:45 UTC
Created attachment 278941 [details]
log output

(In reply to comment #1)
> if you have "modules_2_6", then "modules" wont be read for 2.6.x kernels.  this
> is by design ... variables do not accumulate; only the most exact gets read.
Ick, that explains it, ok then this should work for 2.6 and 3.x kernels : ?

n22 ~ # grep -v '#' /etc/conf.d/modules  | grep -v '^$'
modules_2_6="${modules_2_6} acpi-cpufreq"                   
module_acpi_cpufreq_args_2_6=""                             
modules_3="${modules_3} acpi-cpufreq"                       
module_acpi_cpufreq_args_3=""                               
modules_2_6="${modules_2_6} fbcon"                          
module_fbcon_args_2_6=""                                    


> run `/etc/init.d/modules --debug start` and post the log as an attachment.
done

BTW it is intended that for 2.6.39.2 and 2.6, but not for 2.6.39 is searched ?
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-07-04 07:54:30 UTC
Ok, I found the bug, and have committed a fix in patch be990b30.

In the old code, here's what happened:

If your kernel version had 4 components (say 1.2.3.4), it would look only at the following variables:
modules_1_2_3_4
modules_1_2
modules

If you had 3 components, you get:
modules_1_2_3
modules_1_2
modules


Clearly this always missed modules_1 and iff KV component count was 4, then also modules_1_2_3.
Comment 5 SpanKY gentoo-dev 2011-08-18 15:58:00 UTC
*** Bug 379667 has been marked as a duplicate of this bug. ***
Comment 6 Toralf Förster gentoo-dev 2011-08-18 19:45:16 UTC
Does that commit also fix this issue :

This does not work (all kernels <2.6.38 do not load fbcon automatically) :
modules_2_6="acpi-cpufreq"
modules_2_6_37="acpi-cpufreq fbcon"

This works (but unfortunately fbcon is loaded >=2.6.38 kernels too)
modules_2_6="acpi-cpufreq fbcon"

???
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-08-21 18:23:39 UTC
(In reply to comment #6)
> Does that commit also fix this issue :
> 
> This does not work (all kernels <2.6.38 do not load fbcon automatically) :
> modules_2_6="acpi-cpufreq"
> modules_2_6_37="acpi-cpufreq fbcon"
> 
> This works (but unfortunately fbcon is loaded >=2.6.38 kernels too)
> modules_2_6="acpi-cpufreq fbcon"
> 
> ???
What are you actually trying to accomplish?

The most specific matching variable is used to pick what modules to load.
There is no support for version ranges.
Comment 8 Toralf Förster gentoo-dev 2011-08-21 19:55:11 UTC
(In reply to comment #7)
> The most specific matching variable is used to pick what modules to load.

Well - if I boot kernel 2.6.37 I'd expect that this line matches, but it doesn't :
modules_2_6_37="acpi-cpufreq fbcon"

Furthermore this line isn't used for any booted kernel 3.x even if no other 3.x line is specified:
modules_3="acpi-cpufreq"