trying to avoid a double negative in port variant

Kjell Konis kjell.konis at epfl.ch
Fri Sep 10 03:03:15 PDT 2010


Hello,

I am trying to add a variant to my R port to allow users to choose whether to include R's recommended packages or not. The variant is called recommended. Since R includes the recommended packages by default I added my recommended variant to default_variants:

  default_variants +recommended

What I am having trouble figuring out is how to turn off the variant.  When I run (Portfile is in the cwd)

  bash-3.2# port install -recommended

I get the following usage error:

  Usage: port
          [-bcdfknopqRstuvy] [-D portdir] [-F cmdfile] action [privopts] [actionflags]
          [[portname|pseudo-portname|port-url] [@version] [+-variant]... [option=value]...]...
    
  "port help" or "man 1 port" for more information.

If I remove the default_variants line

  bash-3.2# port install +recommended

works fine.

Is it possible to turn off default variants with - or do I need to do something like +without-recommended?

Thanks (and sorry in advance if this is obvious),
Kjell


More information about the macports-dev mailing list