pkg_postinst

函数 pkg_postinst
用途 在镜像安装到 ${ROOT} 后调用
沙箱 已禁用
权限 root
调用于 ebuild,二进制

默认 pkg_postinst

pkg_postinst() {
	return
}

示例 pkg_postinst

pkg_postinst() {
	if ${OLD_FLUXBOX_VERSION} ; then
		ewarn "You must restart fluxbox before using the [include] /directory/"
		ewarn "feature if you are upgrading from an older fluxbox!"
		ewarn " "
	fi
	elog "If you experience font problems, or if fluxbox takes a very"
	elog "long time to start up, please try the 'disablexmb' USE flag."
	elog "If that fails, please report bugs upstream."
}

常见的 pkg_postinst 任务

pkg_postinst 最常见的用途是显示安装后的信息消息或警告。如果你想显示选择性升级消息,你应该在更早的阶段,比如 pkg_preinst 中调用 has_version,并将结果存储在一个全局变量中。