[MacPorts] #55089: Make "port requested" an alias for "port installed requested"

MacPorts noreply at macports.org
Sat Oct 14 08:29:04 UTC 2017


#55089: Make "port requested" an alias for "port installed requested"
--------------------------+-------------------
  Reporter:  ryandesign   |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.4.2
Resolution:               |   Keywords:
      Port:               |
--------------------------+-------------------
Changes (by ryandesign):

 * version:   => 2.4.2


Comment:

 I can't decide whether I'm in favor of this or not.

 The `port` command accepts first an action name, and then an optional list
 of ports upon which to perform that action. We already have the problem
 that we have several different actions that produce lists of ports with
 differences in formatting:

 * `list` which, for each given port, shows the name, version and category
 that's available in the local ports tree, and defaults to the pseudo-
 portname `all` which expands to the list of all ports;
 * `installed` which, for each given port that is installed, shows the
 name, version, revision, variants, and active/inactive status (and
 platform, archs, and install date, if you use the `-v` flag), and defaults
 to the pseudo-portname `installed` which expands to the list of installed
 ports;
 * `outdated` which, for each given port that is outdated, shows the name,
 installed version and revision, and available version and revision, and
 defaults to the pseudo-portname `outdated` which expands to the list of
 outdated ports; and
 * `echo` which, for each of given port, shows the name and, if given, the
 version, revision and variants, and defaults to no ports.

 So for example you can use `port outdated requested` to see which of the
 ports you requested are outdated and what newer version is available; or
 `port installed actinact` to get installation details for those ports
 which are installed in multiple versions where one is active and others
 are inactive; or `port echo leaves` to get the name, version, revision and
 variants of each installed port that can be safely uninstalled.

 On the one hand, I don't especially want to make the situation more
 confusing than it already is by introducing yet more port-listing actions.
 If we implement your suggestion, the user might wonder why we have two
 actions—`installed` and `requested`—that produce the same format of
 output. It further blurs the lines between action and pseudo-portname,
 making it that more difficult for users to understand the distinction. For
 how many other current pseudo-portnames should we introduce action
 aliases? Would you want `port active` to be an alias for `port installed
 active`? That might be confusingly similar to the existing `port
 activate`, and would at minimum reduce a convenience currently available
 to users: the ability to use the shortest unique abbreviation for an
 action. A user can currently type `port ac` to invoke the `activate`
 action, since no other action currently starts with "ac". If we introduce
 `port active`, then a user would have to type at minimum `port activa` to
 invoke that action.

 On the other hand, I would love to devise a new list format that is
 capable of expressing most or all of the information we need in any
 context, and to then be able to combine some or all of the port-listing
 actions into a single "list" action, at which point for compatibility
 reasons existing commands like `port installed` and `port outdated` would
 become synonymous with `port list installed` and `port list outdated`, and
 one might rightly ask why some pseudo-portnames get this treatment while
 others don't.

--
Ticket URL: <https://trac.macports.org/ticket/55089#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list