Where is port command documented?

Clemens Lang cal at macports.org
Wed Nov 16 18:19:33 UTC 2022


On Mon, Nov 14, 2022 at 09:14:26AM +0000, Lukas Oberhuber wrote:
> The following versions of gimp3 are currently installed:
>  1) gimp3 @2.99.14_0+debugoptimized+quartz+vala
>  2) gimp3 @2.99.13_1+debugoptimized+quartz+vala (active)
> Enter option(s) [1-2/all]:
> 
> This kills my script. What I can't tell is if port -N uninstall gimp3
> exists, or if that is only for port install.

It does exist, but it won't help you in this case, since the command
will just fail. If you want to remove both, use

  port -N uninstall installed and gimp3

You can replace 'installed' with 'inactive' if you want to only
uninstall the inactive version.

If you run the port(1) command but its stdout or stdin are not connected
to a terminal, you get non-interactive mode (-N) by default.

> And before you say: "try it", it's on a ci system so a little harder
> to try, and really, I want a way to understand all the available
> flags.

The manpages are also available online, e.g., at

  https://man.macports.org/port.1.html

> And finally, there is no error message when a flag is used in the
> wrong place, so that makes trial and error even harder. Example port
> install -N gimp3 does not apply the flag but doesn't error.

The general rule is that single-letter flags go after 'port' and
everything else goes the command.

HTH,
Clemens


More information about the macports-users mailing list