Version 0 of kbs discussion

Updated 2009-06-23 08:52:18 by RZ

RZ Some thoughts about a "may be" new package description syntax:

  • change all internal commands to look like switches (Get->-get, Run->-run,..)
  • provide one global command (--) to describe packages with the following syntax:
 -- <pkg> <ver> ?<cmd> <script>?

<cmd> is one of require, source, configure, make, test, clean. The order is not significant. Everything is saved internally and checked before really used.

  • allow access and running of saved contents in scripts

Some examples

Define common functions:

 -- {} {} test {-run make test}
 -- pkga {} test {-run make testaa}

Use common functions:

 -- pkga 0.1 test {{*}[-- pkga {} test]}
 -- pkga 0.2 test {{*}[-- {} {} test]}
 -- pkga 0.3 test {{*}[-- pkga 0.2 test]

or with a special command:

 -- pkga 0.2 test {-include pkga {} test}
 -- pkga 0.2 test {eval [-get {} {} test]aa}

Define a package:

 -- pkga 0.1 require {-use tcl-8.5}
 -- pkga 0.1 source {-link dira}
 -- pkga 0.1 make {-run make}
 -- pkga 0.1 install {-run make install}

or with the same effect:

 -- pkga 0.1 require {-exact tcl-8.5} source {-link dira}\
    make {-run make} install {-run make install}

Open issues

  • syntax of a new "default" command to define a default version for packages
 -- pkga {} default {{*}[-- pkga 0.2]}

or

 -- pkga {} default {0.2}

Remarks and suggestions?