Speeding up pkg_version and perhaps other port utilities

Alexander Leidinger Alexander at Leidinger.net
Mon May 21 07:34:50 UTC 2007


Quoting Doug Barton <dougb at FreeBSD.org> (from Sun, 20 May 2007  
15:20:48 -0700):

> Alexander Leidinger wrote:
>> Quoting Stephen Montgomery-Smith <stephen at math.missouri.edu> (Sat,   
>> 19 May 2007 23:48:52 -0500):
>>
>>> On my system, the program pkg_version can double its speed simply   
>>> by replacing "make -V PKGNAME" by "make BEFOREPORTMK=yes -V PKGNAME"
>
> This is very cool! I've already added it to my devel version of
> portmaster in several places. I call make a LOT in portmaster, so I
> went through every invocation and added this wherever it worked (i.e.,
> didn't cause a difference in (or absence of) output.

Can you share a list of stuff which works? Maybe in our wiki?

> I'd also like to say thanks to Stephen, Alexander, and everyone else
> who's taken an interest in optimizing the ports infrastructure. I've
> managed to work around some of the inefficiencies with portmaster, but
> I learn new tricks (like this one) on a regular basis. Having things be
> more efficient to start with would be a great thing for all of our
> users.

Do you have some tricks to share which aren't discussed here so far?  
Maybe some of them are usable in bsd.port.mk itself.

>>> It seems to me that with some clever use like this, certain   
>>> commands like "make all-package-depends" could selectively read   
>>> only parts of bsd.port.mk.
>>
>> You have to make sure no dependency is set in the second part of
>> bsd.port.mk then. I don't know for sure if this is already the case. I
>> expect that it is not the case.
>
> It depends on the target. My suggestion would be to test them on an
> individual basis. It's usually pretty clear if they will work or not.

Yes, but for the package depends I think you can not use it.

Bye,
Alexander.

-- 
Bender to Zoidberg: "You're looking less nuts, crabby."

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-ports mailing list