[MacPorts] #63451: `port search --variant` doesn't find all matching ports

MacPorts noreply at macports.org
Sun Sep 5 18:15:16 UTC 2021


#63451: `port search --variant` doesn't find all matching ports
---------------------------+--------------------
  Reporter:  ShadSterling  |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  base          |    Version:  2.7.1
Resolution:                |   Keywords:
      Port:                |
---------------------------+--------------------
Changes (by ryandesign):

 * keywords:  search variants regex =>


Comment:

 The string that you are matching against when you search with `--variants`
 is not the name of each variant individually; it's the names of all
 variants, in the order in which they're defined in the portfile,
 concatenated with spaces. (I don't know if that was intentional, and I
 don't know if it's documented.) So for example:

 {{{
 $ port search --variant --line --regex '^java csharp glib2 php erlang rust
 nodejs swift universal$'
 thrift  0.13.0  devel   framework for scalable cross-language services
 development
 }}}

 So for example if you're looking for ports that contain a php variant, you
 can do it with the current search implementation this way:

 {{{
 $ port search --variant --line --regex '(^|\s)php\d*($|\s)'
 dokuwiki        2018-04-22b     www     simple to use wiki aimed at
 documentation projects
 librets 1.6.2   devel   RETS client library
 mybb    1.8.20  www php A PHP-based bulletin board / discussion forum
 system
 phpmyadmin      5.1.1   www php databases       A tool written in PHP
 intended to handle the administration of MySQL over the Web.
 phppgadmin      5.1     www databases   phpPgAdmin is a web-based
 administration tool for PostgreSQL.
 phpsh   1.3-20140514    php devel       PHP read-eval-print-loop
 redland-bindings        1.0.17.1        www     Redland RDF Language
 Bindings
 roundcubemail   1.1.3   www mail php    Roundcube webmail
 squirrelmail    1.4.22  www mail php    A webmail system which accesses
 mail over IMAP
 swig-php        4.0.2   devel   {PHP 7} binding for swig
 swig3-php       3.0.12  devel   {PHP 5} binding for swig
 thrift  0.13.0  devel   framework for scalable cross-language services
 development
 tiki    19.1    www     php based wiki with lots of extra features
 wordpress       5.5.5   www     a state-of-the-art semantic personal
 publishing platform
 zabbix3 3.4.15  net     An open source application and network monitor
 zabbix4-frontend        4.0.32  net     An open source application and
 network monitor
 zabbix5-frontend        5.0.14  net     An open source application and
 network monitor
 zabbix42-frontend       4.2.8   net     Obsolete port, replaced by zabbix5
 zabbix44-frontend       4.4.10  net     Obsolete port, replaced by zabbix5
 ZendFramework1  1.12.20 www lang        A framework for developing PHP web
 applications
 ZendFramework2  2.4.13  www lang        A framework for developing PHP web
 applications
 }}}

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


More information about the macports-tickets mailing list