Deprecating port list

C. Florian Ebeling florian.ebeling at gmail.com
Thu Mar 12 14:46:55 PDT 2009


On Thu, Mar 12, 2009 at 8:08 PM, Rainer Müller <raimue at macports.org> wrote:
> Jeremy Lavergne wrote:
>> I wouldn't expect any logic operations to actually take place in the
>> examples above.  I'd expect it to do the command on each one
>> independently.  When it comes across depends:expat (or something else
>> that's a "reserved" name, I would expect it to function according to
>> what the command is, and apply it to the following ports.
>
> No, you completely misunderstand pseudo-ports.
>
> This is not meant as a modifier for following ports (how would you unset
> the modifier?), but as a selector. A pseudo-port like depends:expat is
> replaced by a set of ports. In this case, all ports depending on expat
> will be listed there.
>
> You combine sets of ports using logical operators "and", "or", "not",
> "!", "(" and ")".
>
> If you are interested in all the python modules being unmaintained you
> could do a query like:
>  port echo maintainer:nomaintainer and \( py-* py25-* py26-* \)
>
> And it is even possible to find all python modules with either no
> maintainer or having openmaintainer set:
>  port echo \( maintainer:nomaintainer maintainer:openmaintainer \) \
>  and \( py-* py25-* py26-* \)

This is indeed quite powerful and sure one of the nice aspects
of macports. It think the documentation does not give it
the credit it deserves, but the query possibilities are really
extensive here.

With respect to the original question, I'd like to mildly oppose
the idea to remove 'list' entirely. Rather making it behave like
'echo' is something I could imagine to work well.

'echo' as it is, it feels, is meant a bit like 'debug-query-statement'
or something: just to see what a particular expression would yield.
But in many instances, the output from echo is exactly what you
want; think shell script 'for' loop. So 'list' could become an alias
for 'echo'. For in-depth information, there is still 'info.' Or we
could make the version information appear only on -v/verbose flag.

Also, I find 'port installed' and 'port outdated' a bit odd, because
they look very much like the pseudo-name selectors, but they
aren't. And they really are the only commands the 'receipt database,'
as opposed to the portindex/portfile database. (IIRC, that is.)

So one solution to make the whole command line interface more
consistent would be to introduce a 'receipt database' / installed
software (top level) command, which in turn accepts subcommands --
which might well be only 'installed' and 'outdated' in the beginning,
still mimicking 'list' and its subcommands / query expression language.
Later this command would become more parallel, or mirror, the 'list'
query expression capabilities.

I can't really come up with a name for this 'installed ports database'
top-level command right now, unfortunately. 'host'? 'local'? 'present'?
I don't know. Anyone else have an idea? :)

So, in summary, I'd propose: keep 'list' and make it more clear (remove
latest version, or put both) make the distinction between index and
installed more visible by introducing more or less parallel top-level
command for each.

Florian


>
> You can't do such things with simple modifiers you proposed and they
> work for any port command accepting a list of ports, that is such a port
> expression.
>
> This is very powerful, but you don't have to use it. It is still easy
> and intuitive to give a simple list of port names to a port command.
>
> Rainer
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
>



-- 
Florian Ebeling
Twitter: febeling
florian.ebeling at gmail.com


More information about the macports-dev mailing list