Here is a patch for review. I have made the "obvious" changes in order
to be able to do the following:
mock -r CFG srpm1 srpm2 srpm3 srpm4
Limitations:
- There are no checks for dependencies between the srpms, so they should
be independent. (no re-ordering of SRPMS)
- Building one SRPM can leave the buildroot in an inconsistent state for
the next SRPM. (no clean of chroot between builds)
- Failure to build one SRPM stops the whole process.
- Resulting RPMs are not installed into the build environment for use by
subsequent SRPMS.
Reasoning:
One problem I have been having with mock is speed. We are using
mock to build for 16 distinct configurations. Doing prep on each
configuration was taking a minute and a half to two minutes. As an
optimization, our mock wrapper script was doing a single prep per chroot
and then using --no-clean, but this complicates our wrapper script. I am
building a set of related RPMS, so I don have much concern about
cross-pollution. This simple patch simplifies my wrapper script
considerably.
Future:
One future direction I'd like to take this is a parallel mock
that can prep/build multiple configurations at the same time to try to
amortize the cost of prep stage by running prep of one environment in
parallel with build of a different configuration. Currently, it is
taking me an hour to build 16 sets of RPMS (5 SRPMS per set), and I am
hoping to get this down. We have already implemented squid and some
other measures to try to speed things up.
--
Michael
<<mock-multi.patch>>
Show replies by thread