Lots of installed ports show "succeeds index"
Matthew Seaman
m.seaman at infracaninophile.co.uk
Sat Jul 26 09:37:41 UTC 2014
On 26/07/2014 10:23, Konstantin Belousov wrote:
> On Sat, Jul 26, 2014 at 09:57:49AM +0100, Matthew Seaman wrote:
>> On 24/07/2014 18:19, Kevin Oberman wrote:
>>> If 'pkg version' only took a few seconds for you, I suspect you had very
>>> few ports installed. It has always taken minutes for me.
>>>
>>> That said, '-P' is much slower than the old default, even though it is
>>> doing as close as possible to the same thing.
>>
>> The reason that the -P check is slower is because it now checks not just
>> for the presence of the port directory, but also that the port is hooked
>> up to the ports tree. See
>>
>> https://github.com/freebsd/pkg/commit/2c84533f4d7291c26fe826a67217fb3c3ab446a5
>>
>> So you've got a choice here: slow and unreliable versus even slower, but
>> correct. Unfortunately the only way to extract version information from
>> the ports involves running make(1) and that is intrinsically slow.
>
> Am I right that it checks for the presence of a port in the <category>
> directory, but possible absence of the same port in the <category>/Makefile ?
> If yes, can this behaviour made optional ?
Yes, that's what it does.
I'd not be terribly keen on reverting to the old behaviour, which
resulted in some cases in completely garbled results. There is a
relatively simple speed-up that could be implemented: for a system with
a number of packages installed the scan of the category Makefile is
repeated when there are many packages in the same category. Keeping the
results around so it doesn't need to be started from scratch each time
would be an obvious win.
If anyone feels like implementing that, we are always glad to receive
pull requests.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20140726/0893bc7b/attachment.sig>
More information about the freebsd-ports
mailing list