mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-12-02 23:32:16 +00:00
39c12e119b
buildall now calls prepare_mock_resultdirs before the cache checks, so a cached build also loads the mock configuration through mockbuild.config. release_repository.t builds xCAT-release in a user namespace on a host without mock, and the build stopped with "mock is not installed: cannot import mockbuild.config". The namespace fixture already stands in for /etc/mock. It now also puts a stand-in mockbuild package on PYTHONPATH. Its load_config fails when the chroot configuration is missing, and reports the caller as chrootuid, as mock does when no chrootuid is set. buildrpms.pl is unchanged. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
12 lines
363 B
Python
12 lines
363 B
Python
# Stand-in for mock's configuration loader in the namespace build fixture.
|
|
# Without chrootuid, mock builds as the caller.
|
|
import os
|
|
|
|
MOCKCONFDIR = '/etc/mock'
|
|
|
|
|
|
def load_config(config_path, name):
|
|
if not os.path.isfile(os.path.join(config_path, name + '.cfg')):
|
|
raise SystemExit('no mock configuration ' + name)
|
|
return {'chrootuid': os.getuid()}
|