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]

ecosconfig patch


I have made a trivial modification to ecosconfig to add support for a new
command called "test".  Basically "ecosconfig test" does the same thing that
"ecosconfig check" does, except that it does not rewrite the ecos.ecc config
file.  I did this because I frequently try things out by just editing the
file in emacs, running "ecosconfig check" to see if I created any conflicts,
and then either continue with whatever I was trying or revert to the
original ecos.ecc.  The problem is, ecosconfig overwrites the file, so I
have to reload it.  Sometimes Emacs is able to reconstruct where I was in
the file, and sometimes it cannot.

Anyway, I have made this simple modification and now I have two questions:
1) Are you (the eCos maintainers) interested in it? (I anticipate the answer
to this would probably be "Sure, why not?  If it doesn't break anything, it
seems like it might be useful in some circumstances.")

2) Would it have been better to have added an option to "ecosconfig check",
perhaps "-n" for "Don't rewrite the config file" instead of adding a new
command?  I could easily switch to a "-n" option of the "check" command if
that makes more sense.

Also, as long as I have your attention :-), I started looking at modifying
the export/import behavior to support listing removed packages as was
discussed on this list a few weeks ago.  I have gotten far enough into this
to realize that it is significantly more complicated than my "ecosconfig
test" patch and also to wonder about what the "best" way to handle this
would be.  For example, should I try (somehow) to maintain some level of
backwards compatibility with previous version of ecosconfig?  If so, then I
think I would flag the removed packages with a "-removed" option in the
export file.  That way, one would only get a warning ("I don't know what the
'-removed' option is") from older versions of ecosconfig.  If not, then I
guess I would add a "removed_package" command to the interpreter which will
choke older versions of ecosconfig.  Alternatively, I could list the removed
packages in a comment line, but then I would need to modify the parser to
look for those special comment lines.

As I said, it got much more complicated much more quickly.  Any suggestions?
Should I drop this because one of you have already dashed out a solution?
(Did a solution sneak into the CVS archives when I wasn't looking?)

--wpd


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