mock feature requests

Dan Williams dcbw at redhat.com
Mon Jun 20 17:26:01 UTC 2005


Hi,

I would like to request a couple additions to mock for the build
system...

The important ones:
---------------------

1) Ability to pass $statedir from mock's command line.  Since the
process calling mock has no clue where the buildroot actually is
(without parsing the *.cfg file for the buildroot, see issues with that
below), the builder needs to be able to specify where mock writes its
state so that the builder can read that state.  We talked about adding a
"--statedir" parameter to mock.

2) Doing multiple concurrent builds with two separate mock processes for
the same target/buildroot will fail because the mock *.cfg file for a
buildroot doesn't distinguish between different processes.  We've talked
about making the config file have something like:

config_opts['root'] = 'aurora-development-sparc-core-%s' % os.getpid()

If there was any way to embed the addition of the PID into mock though,
I think that would be better since there's less possibility of the users
accidentally screwing that line up.

Perhaps another solution would be to add a mock argument like
"--rootdir-suffix" such that the calling process could specify a suffix
to add, and in the buildsystem that would most likely be the jobid of
the build job.

3) The build client is expected to clean up after the mock process, and
it cannot know what directory to delete unless it's able to find out
what the buildroot dir is from mock.  Ideally the client wouldn't have
to parse the mock .cfg file, but perhaps mock would write out the
buildroot dir to its stdout first thing, or some other mechanism of
telling the calling process what the buildroot dir is.


Less important:
------------------------------------

4) commands.getstatusoutput() seems to buffer the output of the child
until the child has exited.  It would be nice (and somewhat useful) to
stream the command output to a file rather than grab it all at once and
write it out at the end.  Packages like OpenOffice.org generate lots of
build output, around 25MB.  That's a lot of memory usage at the end of
the job when the output buffer is acquired and written out all at once.
I've also thought of adding a feature to the build system like "get last
500 lines of buildlog output" so that users might be able to see where
in the package the build is (for OOo, the build takes about 3 - 7 hrs on
moderate hardware).

Thanks,
Dan





More information about the Fedora-buildsys-list mailing list