Phil Sutter dixit:

>Yes, in terms of conflicting packages. So combined it probably should be
>"selection of exactly one" ;)

No, you must be able to
* select zero (I just demand that, without explanation, as it's
  trivial, and to prove that is needed is left as an exercise to
  the interested reader)
* select one
* select zero or one, and N as modules (ipkgs)
* select all as modules (ipkgs) and choose which one to
  'ipkg install' later after flashing (how do we resolve
  conflicts there?)

So the intelligent solution would be to make them not conflict,
and if they provide similar functionality, leave it up to the
user to only enable one (since all are disabled by default).

>Why not implementing a little more intelligent solution making heavy use
>of `sed'?

This is an interesting approach, but can easily produce broken
output. We should look into it anyway (but using ed, not sed,
sed is a stream editor) I guess, but also provide "clean" .config
samples somewhere (unless rm .config is enough).

With ed, it looks like follows:
cp .config .config.old
ed -s .config <<EOF
/# FWRT_FOO/s/^# \(.*\)$/\1=y/
/FWRT_BAR/s/^/# /
...
wq
EOF

bye,
//mirabile
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.              -- Coywolf Qi Hunt
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to