Re: Re: funny results with 'port list inactive'

[email protected] Thu, 24 Aug 2006 00:23:34 -0700
Newsgroups gmane.os.opendarwin.darwinports
Message-ID <[email protected]>
On 8/23/06, Bryan Blackburn <[email protected]> wrote:
> On Aug 23, 2006, at 8:08 AM, James Berry wrote:
> >
> > On Aug 22, 2006, at 11:51 PM, Bryan Blackburn wrote:
> >
> >> On Aug 22, 2006, at 10:34 PM, Wojciech Grzemski wrote:
> >>
> >>> Hello,
> >>>
> >>> I was in the process of upgrading my ports collection, when I've
> >>> noticed that:
> >>> $ port list inactive | wc -l
> >>>   3481
> >>> $ port list | wc -l
> >>>   3481
> >>>
> >>> Is this to be expected?  Knowing that I have no inactive ports I
> >>> would
> >>> prefer to have output similar to the one given by 'port outdated'.
> >>>
> >
> > The pseudo portnames basically expand to a list of ports. By saying
> > "port list inactive" you are effectively passing each port on the
> > command line to list, which is giving you output for each. The
> > command has no opportunity to look at the request from a high level
> > and say "well, duh, there are no inactive ports.
> >
>
> Ah, so in this case, 'port list inactive' logically became just 'port
> list' since the inactive part ended up empty?

actually, i believe the conditional is checking a different case than
the printed output would suggest. it checks the length of the array
$ilist which contains not the pruned list of outdated ports, but the
list of _installed_ ports. unless the user does not have any ports
installed, the message "The following installed ports are outdated:"
will be printed regardless of outdated state.

see:
	<http://bugzilla.opendarwin.org/show_bug.cgi?id=8723> Bug 8723: BUG
port oudated should provide different output when no outdated ports

regards,
jean-pierre