From Fedora Project Wiki

< Mock

Revision as of 14:59, 16 February 2015 by Msimacek (talk | contribs) (Correct chroot_scan usage)

Chroot Scan Plugin

The chroot_scan plugin is used to grab files of interest after a build attempt and copy them to the 'result directory' before the chroot is cleaned and data lost.


The chroot_scan plugin is disabled by default. To enable it and to add files to the detection logic, add this code to configure file:

   config_opts['plugin_conf']['chroot_scan_enable'] = True
   config_opts['plugin_conf']['chroot_scan_opts'] = {
       'regexes': [ "core(\.\d+)?", "\.log$",]

The above logic turns on the chroot_scan plugin and adds corefiles and log files to the scan plugin. When the 'postbuild' hook is run by mock, the chroot_scan will look through the chroot for files that match the regular expressions in it's list and any matching file will be copied to the mock result directory for the config file. Again if you want this to be enabled across all configs, edit the /etc/mock/site-defaults.cfg file.