[PATCHES] Makefile.common speedups

Adam Jackson ajax at redhat.com
Wed Jul 30 15:58:17 UTC 2008


Attached are two (orthogonal) patches to make evaluation of
Makefile.common a bit faster.

The first one is possibly contentious.  Currently, early-branching works
by checking for the existence of the other branch, by using 'cvs rlog'.
That kinda sucks, because it means you can't do 'make local' while
disconnected, and even when connected it's not fast.  The patch changes
it to look for the package's name in a new file,
common/early-branched-packages.  By keeping that file together with
Makefile.common we get pretty much the behaviour we're used to: when
build targets change, you have to update common/.  Note that if we apply
this patch we will also need to create that (empty) file.

This would change the cvsadmin procedure for early branching, but
hopefully not by a burdensome amount.

The second one is just a refactoring to only ask rpm for %VERSION and
%RELEASE once.  In principle, for packages that overrode both VERSION
and RELEASE in their Makefile, this would actually make things slower,
since now you'd be forcing rpm to run.  According to my pkgcvs checkout,
no such packages exist.

Tested locally on a 3.2GHz P4.  'time make' baseline was 1.3 seconds.
First patch dropped that to about 0.6 seconds.  Second patch on top of
that dropped down to about 0.38 seconds.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Redo-early-branching.patch
Type: text/x-patch
Size: 1221 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20080730/0e18ebd5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Invoke-rpm-less.patch
Type: text/x-patch
Size: 1562 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20080730/0e18ebd5/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20080730/0e18ebd5/attachment.sig>


More information about the Fedora-buildsys-list mailing list