[PATCH 1/3] command: introduce abi version

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Oct 29 12:05:13 EDT 2012


On 10:56 Mon 29 Oct     , Johannes Stezenbach wrote:
> On Mon, Oct 29, 2012 at 09:50:55AM +0100, Sascha Hauer wrote:
> > On Mon, Oct 22, 2012 at 06:07:26PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > This will allow to detect incompatibility between the env abi and the current
> > > barebox one
> ...
> > > +
> > > +#define COMMAND_ABI_VERSION	0
> > 
> > Please describe what this is. Something like:
> > 
> > /*
> >  * This tracks incompatible changes to the barebox command interface.
> >  * This number is increased when changes are introduced which will cause
> >  * an older environment to no longer work. This could be:
> >  *
> >  * - changes in commandline options to commands
> >  * - renames of commands
> >  * - rename of device files
> >  *
> >  * If you change this value, add a explanation of the actual change to
> >  * Documentation/command-abi-changes.txt
> >  */
> 
> I wonder how this will work in practice.  If I use a simple
> /env/bin/init script and someone makes changes to a command
> which isn't used by my /env/bin/init, will it still cause
> my environment to be detected as incompatible?
> 
> Maybe it would be a good idea to give the user control
> over when to change COMMAND_ABI_VERSION by putting it into menuconfig?
> 
> Either way I guess it means the default environment's init script
> would need to implement automatic update to not lose important  settings.
here you loose nothing we just load defaulenv then you load the old one if you
one the code does not save the defaultenv automatlically
> 
> Bottom line: It's much better to not make incompatible ABI changes _ever_.
I disagree here sometimes we do need as the ABI is really not convinian or
POSIX or like this linux one

Best Regrds.
J.
> 
> 
> Johannes



More information about the barebox mailing list