Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/Plugin-Hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ Where `HOOK_NAME` is one of:
* prechroot - This hook is called just before executing a command when `mock chroot` command has been used. This action is currently being used by `root_cache` plugin.
* preinit - Only chroot and result_dir directories exist. There may be no other content. No binary. Not even base directories. Root_cache plugin uses this hook to populate the content of chroot_from cache. HW_info gather information about hardware and store it in result_dir. This action is currently being used by `ccache`, `hw_info`, `root_cache`, `yum_cache` plugins.
* preshell - This hook is called just before giving a prompt to a user when `mock shell` command has been used. This action is currently being used by `pm_request`, `root_cache` plugins.
* pre_srpm_build - Called before generating the SRPM (`rpmbuild -bs`). Used in `--buildsrpm` mode only.
* preyum - This hook is called before any packager manager action is executed. This is, e.g., used by `root_cache` plugin when `--cache-alterations` option is used. This action is currently being used by `root_cache`, `selinux`, `yum_cache`.
* process_logs - Called once the build log files (root.log, build.log, ...) are completed so they can be processed (e.g. compressed by the `compress_logs` plugin).
* remove_snapshot
* rollback_to
* scrub
* umount_root - The counterpart to mount_root; called to instruct the buildroot-managing plugin to unmount the buildroot.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better clarity and consistency with other hook descriptions, consider adding more context about when umount_root is called. Mentioning its position relative to other hooks like postumount and postclean would be very helpful for plugin developers. Also, mount_root should be enclosed in backticks for consistency.

Suggested change
* umount_root - The counterpart to mount_root; called to instruct the buildroot-managing plugin to unmount the buildroot.
* umount_root - The counterpart to `mount_root`. Called during cleanup to instruct a buildroot-managing plugin to unmount the buildroot. It is called after `postumount` and before `postclean`.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not called after postumount.


You can get inspired by existing [plugins](https://github.com/rpm-software-management/mock/tree/master/mock/py/mockbuild/plugins).
Loading