This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Beware ecosconfig was Re: [Fwd: Beware ConfigTool]


>>>>> "John" == John Carter <john.carter@tait.co.nz> writes:

    John> On Tue, 27 Jul 2004, "pb.jack" <pb.jack@powerbase.com.tw> wrote:
    >> I found a strange behave of configtool 2.0...

    John> My guess is it is the underlying ecosconfig tool.

That is unlikely because the graphical configtool does not depend on
ecosconfig.

    John> It's really quite cute.

    John> Did you know it rewrites your config file on the fly every
    John> time you use it?

    John> I first noticed that it changes the "modified" time stamp
    John> every time you run "ecosconfig tree".

    John> Played havoc with my fancy "Makefile". Had to use a
    John> md5checksum instead of timestamps to work out when to remake
    John> things.

ecosconfig works on the assumption that the user can edit the ecos.ecc
file at any time (or, in the case of system developers, the underlying
.cdl files). If you do an "ecosconfig tree" it seems like a good idea
to make sure that the saved ecos.ecc file matches the generated
makefiles. Otherwise things could get much more confusing.

A possible optimization would be to write to a temporary file, compare
that with ecos.ecc, and only overwrite the latter if there have been
any changes. So far nobody has considered this optimization worth
implementing.

If you do not like the default behaviour you can use the
-n/--no-updates option. That suppresses writing the ecos.ecc file.

    John> And if it finds things that it doesn't like, did you know it
    John> quietly overwrites them?

Not quietly. Every change made by the inference engine should be
reported to the user, via lines like:

  U <option>, new inferred value <value>

so you are told exactly what is happening. The only way to suppress
this output is to use the -q/--quiet option. Note that if any ecos.ecc
modifications result in changed default_value expressions then those
won't be reported. However each ecos.ecc option entry lists all such
expressions so it should be obvious what will happen when you change a
value.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]