First impressions of mock 1.1.3

Paul Howarth paul at city-fan.org
Sun Aug 8 17:26:33 UTC 2010


Good:

I no longer need my selinux workaround:

config_opts['files']['selinux/enforce'] = "0"


Bad:

New option max_fs_size for tmpfs plugin doesn't seem to have a default
value; at least I get a traceback if I use my old config, which had
just:

config_opts['plugin_conf']['tmpfs_enable']                      = True
config_opts['plugin_conf']['tmpfs_opts']['required_ram_mb']     = 2048



Root cache is huge because of cache files getting copied to the cache.
The following change restored sanity:

--- /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py.orig	2010-08-03 22:04:48.000000000 +0100
+++ /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py	2010-08-08 18:10:42.175478756 +0100
@@ -118,6 +118,8 @@
                                                        "--exclude=./proc",
                                                        "--exclude=./sys",
                                                        "--exclude=./dev",
+                                                       "--exclude=./tmp",
+                                                       "--exclude=./var/cache/yum",
                                                        "."],
                         shell=False
                         )



Mock always exits with non-zero exit code due to problems uumounting 
filesystems, leading my build scripts to declare the builds as duds:

DEBUG backend.py:520:  Copying packages to result dir
DEBUG backend.py:639:  umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc
DEBUG util.py:289:  Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc
DEBUG util.py:255:  umount: /var/lib/mock/city-fan-rawhide-i686/root/proc: device is busy.
DEBUG util.py:255:          (In some cases useful info about processes that use
DEBUG util.py:255:           the device is found by lsof(8) or fuser(1))
DEBUG util.py:328:  Child returncode was: 1
DEBUG backend.py:639:  umount -n /var/lib/mock/city-fan-rawhide-i686/root/sys
DEBUG util.py:289:  Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/sys
DEBUG util.py:328:  Child returncode was: 0
DEBUG backend.py:639:  umount -n /var/lib/mock/city-fan-rawhide-i686/root/var/cache/yum
DEBUG util.py:289:  Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/var/cache/yum
DEBUG util.py:328:  Child returncode was: 0
DEBUG backend.py:639:  umount -n /var/lib/mock/city-fan-rawhide-i686/root/tmp/ccache
DEBUG util.py:289:  Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/tmp/ccache
DEBUG util.py:328:  Child returncode was: 0
DEBUG backend.py:639:  umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc/filesystems
DEBUG util.py:289:  Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc/filesystems
DEBUG util.py:328:  Child returncode was: 0
DEBUG backend.py:639:  umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/pts
DEBUG util.py:289:  Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/pts
DEBUG util.py:328:  Child returncode was: 0
DEBUG backend.py:639:  umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/shm
DEBUG util.py:289:  Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/shm
DEBUG util.py:328:  Child returncode was: 0
DEBUG util.py:289:  Executing command: ['umount', '-n', '/var/lib/mock/city-fan-rawhide-i686/root/']
DEBUG util.py:255:  umount: /var/lib/mock/city-fan-rawhide-i686/root/: device is busy.
DEBUG util.py:255:          (In some cases useful info about processes that use
DEBUG util.py:255:           the device is found by lsof(8) or fuser(1))
DEBUG util.py:328:  Child returncode was: 1
DEBUG util.py:97:  kill orphans


I'll have to get my script to ignore mock's exit status for now
and check for built packages in the result directory I think.

Paul.


More information about the buildsys mailing list