Skip to main content
1-Visitor
September 19, 2012
Solved

AND and OR in si configuresandbox --scope=... expression?

  • September 19, 2012
  • 1 reply
  • 3463 views

How can I configure a sandbox scope like "path:AAA OR path:BBB OR name:frolic.txt"?

The Help file for the 2009 MKS Integrity GUI says that the "si configuresandbox" command can be used to implement scopes using a combination of logical AND or OR operators, but the si manpage we have doesn't seem to mention --scope and the help text from "si configuresandbox -?" indicates some syntaxes like "name:value" and "path:<expression>" with no hints about how to apply logical operators.

Pointers to documentation I missed are appreciated!

Thanks,

Barrie

    Best answer by mrump

    Hi Barrie,

    the best description you can find is in the SourceCLIReference.pdf described in commands "createsandbox" or "configuresandbox".

    “OR”- combination of scopes of the same type is done with comma. E.g.

    --scope=name:*.c, name:*.h, name:*.xml

    “AND”- combination of scopes is done with a new scope. E.g.

    --scope=path:/030_Software/* --scope=name:*.c, name:*.h

    Please Note:

    You cannot set a combination of scopes via the client GUI (due to a poorly programmed dialog). All "advanced" scope settings must be done via the CLI.

    “NOT”- inversion of a scopes of the same type is done with “!”. E.g.

    --scope=!name:*.zip

    HTH

    Matthias

    1 reply

    mrump16-PearlAnswer
    16-Pearl
    September 21, 2012

    Hi Barrie,

    the best description you can find is in the SourceCLIReference.pdf described in commands "createsandbox" or "configuresandbox".

    “OR”- combination of scopes of the same type is done with comma. E.g.

    --scope=name:*.c, name:*.h, name:*.xml

    “AND”- combination of scopes is done with a new scope. E.g.

    --scope=path:/030_Software/* --scope=name:*.c, name:*.h

    Please Note:

    You cannot set a combination of scopes via the client GUI (due to a poorly programmed dialog). All "advanced" scope settings must be done via the CLI.

    “NOT”- inversion of a scopes of the same type is done with “!”. E.g.

    --scope=!name:*.zip

    HTH

    Matthias

    1-Visitor
    September 21, 2012

    Thanks, Mattias.

     

    I checked that PDF prior to posting; the copy at http://www.mks.com/support/productinfo/docs/SourceCLIReference.pdf does not mention --scope.

     

    Is it possible to do "(path:AAA AND name:frolic*.txt) OR path:BBB"?

     

    Also, is there any quoting mechanism for whitespace or colons in filenames?

     

    Seems like allowing "||" and "&&" or similar in the scope <expression> would be useful.

     

    Thanks again!

     

    - Barrie

    16-Pearl
    September 21, 2012

    Hi Barrie,

    I took a quick look, and couldn't find anything references to --scope before

    Integrity 2009 SP6, in which the Source CLI Referece for Integrity 2009 SP6 Guide does contain a good explanation under si createsandbox on page 62. Make sure that the service pack you are using supports the --scope option. I do not believe it was a valid option in Source Integrity 2007. Regards, Kael