Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Mar 2013 13:08:09 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-pkg@freebsd.org
Subject:   Re: pkgng info command: -d overrides -r?
Message-ID:  <51349CB9.4090004@infracaninophile.co.uk>
In-Reply-To: <20130304114037.GJ64570@ithaqua.etoilebsd.net>
References:  <51347590.4090201@bluerosetech.com> <20130304114037.GJ64570@ithaqua.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 04/03/2013 11:40, Baptiste Daroussin wrote:
> CCed to pkg@FreeBSD.org where the discussion deserves to be :)
> 
> On Mon, Mar 04, 2013 at 02:21:04AM -0800, Darren Pilgrim wrote:
>> With pkg_info, I can get a list of ports requiring and depended on by a 
>> given port by doing `pkg_info -rR`.  In pkgNG, the equivalent would be 
>> `pkg info -dr`, but there appears to be a problem giving -d and -r at 
>> the same time.  For example:
>>
>> # pkg info -r postgresql-client-9.2.3
>> postgresql-client-9.2.3 is required by:
>> postgresql-server-9.2.3
>>
>> # pkg info -d postgresql-client-9.2.3
>> postgresql-client-9.2.3 depends on:
>> pkgconf-0.8.9
>> libiconv-1.14
>> libxml2-2.7.8_5
>> gettext-0.18.1.1
>>
>> So the output of -dr should be something like this:
>> # pkg info -dr postgresql-client-9.2.3
>> postgresql-client-9.2.3 depends on:
>> pkgconf-0.8.9
>> libiconv-1.14
>> libxml2-2.7.8_5
>> gettext-0.18.1.1
>> postgresql-client-9.2.3 is required by:
>> postgresql-server-9.2.3
>>
>> But instead I get this:
>>
>> # pkg info -dr postgresql-client-9.2.3
>> postgresql-client-9.2.3 depends on:
>> pkgconf-0.8.9
>> libiconv-1.14
>> libxml2-2.7.8_5
>> gettext-0.18.1.1
>>
>> # pkg info -rd postgresql-client-9.2.3
>> postgresql-client-9.2.3 depends on:
>> pkgconf-0.8.9
>> libiconv-1.14
>> libxml2-2.7.8_5
>> gettext-0.18.1.1
>>
>> It looks like pkg ignores -r if -d is given, but the two shouldn't be 
>> exclusive.  Am I missing something?
> 
> No you are missing nothing in fact we haven't handled yet options multual
> exclusion.
> 
> I haven't thought that anyway one will do a pkg info -rd so I didn't test what
> could be happening here :)
> 
> thanks for reporting, definitly something to work on, don't know yet what should
> be done here:
> either say "hey you can't pass -r and -d at the same time" which would be the
> easy fix :) or output things like you suggested which will be less easy

Actually, making pkg info show both should be pretty easy.  It's the
same function for generating the output as used by pkg search and that
definitely can show any arbitrary combinations of data about packages.
You just pass it a bitmap telling it what you want to print out.

Or is that only in the 1.1 code?  I've lost track.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew@infracaninophile.co.uk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51349CB9.4090004>