On 04/12/08 09:37 +0100, Claudio Scordino wrote: > michael ha scritto: >> Hi all, >> >> I'm writing a plugin that use sbox2 and I think that the sb2-conf -l >> may return an error code. > > Hi all, > > I do agree with Michael that the command "sb2-config -l" on > Scratchbox2 should return an error code in case the $HOME/.scratchbox2/ > directory is missing. > > This makes writing plugins for Eclipse or Anjuta easier. Such plugins > need to get the list of targets through the sb2-config command. > > If sb2-config returns an error code, the plugins can understand if the > return value is right or wrong. > > Therefore, can you please include the patch that Michael sent in his > e-mail ?
Sure, I added also some additional error detection, filters out any dangling .scratchbox2/libtool_build directories and in case no targets are found (even if .scratchbox2 exists), it returns an error. The command outputs error messages to stderr, so capturing its stdout should always give clean list of targets. This practise should be used for all other sb2 commands as well, to help non-humans. /lauri _______________________________________________ Scratchbox-devel mailing list [email protected] http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-devel
