Speeding up pkg_version and perhaps other port utilities
Garrett Cooper
youshi10 at u.washington.edu
Sun May 20 23:14:09 UTC 2007
Doug Barton wrote:
> 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.
>
> 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.
>
>>> 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.
>
> hth,
>
> Doug
(On a similar note):
Ugh.. I really hate the Ruby tools now. See
<http://blogs.freebsdish.org/gcooper/2007/05/20/the-inefficiencies-of-pkgdbdb/>
for more details.
-Garrett
More information about the freebsd-ports
mailing list