After a short time trying FreeBSD, I'm back to GoboLinux, interested in the
new useflags. I want to write some Recipes for programs I need and to
include useflags support in them. I have some ideas for useflags
implementation I want to share (if any of these is already implemented,
please ignore it):

- Useflags descriptions:

I think every Recipe that has useflags should have a short description about
the purpose of enabling each of them, because, in some cases, this effect
isn't as trivial as the own flag name could suggest.
Maybe these descriptions could be included in the Resources/Description file
of the Recipe, or set in a special variable (e.g.: use_<flag>_description="A
short description about flag <flag>"). The second option would allow us to
have a system file with default descriptions for all useflags, and the
Recipe could overwrite any of them, if it's necessary a different
description.



- A dialog interface for setting useflags:

We could write a small program that shows a dialog interface with all
useflags available for a given Recipe in a checklist form, allowing the user
to set/unset any of them, like the "make config" command for FreeBSD Ports.
This program should read the useflags descriptions as suggested above and
show them in the interface, and update the /System/Settings/UseFlags.conf
file with the new changes.
A Compile option could also be added to invoke such an interface for setting
useflags on the fly, before compiling a Recipe. This could be done
recursively for all dependencies of this Recipe, like the "make
config-recursive" command in Ports.



- Support for mutually exclusive useflags:

Is there currently any support for mutually exclusive useflags in GoboLinux?
For example, a Recipe I want to write for Maxima could have the following
list of mutually exclusive flags: (clisp, gcl, cmucl, sbcl). Some other
Recipes could have several groups of mutually exclusive flags: (flag1,
flag2, flag3), (flag4, flag5). I think it could be declared at the end of
Resources/[Build]Dependencies files, with a special syntax, e.g.:

FooBar
FooBaz [flag1]
BarFoo [flag2]
FooFoo
BarBar [flag3]
# Hypotetical syntax declaring flags flag1, flag2 and flag3 as mutually
exclusive
![flag1,flag2,flag3]
# In this case, flag1 is set by default, if none of them is set in
/System/Settings/UseFlags.conf
!![flag1,flag2,flag3]

When Compile detects that more than one flag in a mutually exclusive list is
set for a given Recipe, it would fail and return an appropriate error
message. The dialog interface suggested above could show a group of mutually
exclusive useflags in a radiolist, instead of a checklist, with an
additional entry to set none of them.



What do you think about it?

Best regards.
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to