[lkml]   [2001]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [kbuild-devel] Why recovering from broken configs is too hard
On Thu, 3 May 2001 03:47:55 -0400, 
"Eric S. Raymond" <> wrote:
>OK, so you want CML2's "make oldconfig" to do something more graceful than
>simply say "Foo! You violated this constraint! Go fix it!"

(i) Start with a valid config. CML2 will not allow any changes that
violate the constraints. Not a problem.

(ii) Start with a invalid config. CML2 makes best effort at correcting

(a) Interactive mode (menuconfig, xconfig) - tell the user to fix

(b) Batch mode (oldconfig). Attempt to automatically correct the
config using these rules.

(1) Earlier constraints take priority over later constraints.
That is, scan the constraints from top to bottom as listed
by the rules.

(2) For valid constraints, freeze all variables in the
constraint, both guard and dependent.

(3) For failing constraints, freeze the guard variables, change
the dependent variable to satisfy the constraint then
freeze it.

(4) If a dependent variable is already frozen then give up,
human intervention is required. This includes any
variables that are changed as side effects of updating a
dependent variable.

(5) Backtracking is required between (4) and (3) if the
dependent variables in (3) can take more than one value.
For example with RTC!=n then set RTC=y, freeze it and try
to complete the remaining constraints. If you cannot find
a consistent set of values, unfreeze all variables from the
later constraints, unfreeze RTC, set RTC=m, freeze and go
forward again.

>Worst-case you wind up having to filter 3^1976 or

bc is a wonderful tool :)

Worst case with my algorithm is the product of the number of possible
values that each dependent variable can take over all constraint rules.
In the vast majority of cases, there is only one possible value, either
because the constraint is already valid or because the dependency
requires a single value. So the number of possible cases to test is
governed by how many rules use != or < or > instead of ==.

Is this perfect? No, you can construct pathological constraints that
involve a lot of backtracking and even then there may be no valid set
of values.

Do we care? No, we do not write rules like that.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.147 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site