Summary: | net-nds/openldap-2.4.30: some elog messages should only be shown for the first install. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | poletti.marco |
Component: | Current packages | Assignee: | Gentoo LDAP project <ldap-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arfrever.fta |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 440214 |
Description
poletti.marco
2012-10-31 10:59:02 UTC
Also: - elog "Adding $(basename ${x})" + einfo "Adding $(basename ${x})" Users do not need to see this after a successful build, only during (if at all). What if it it built with USE=minimal, and then you are rebuilding with USE=-minimal, in that case, I want to display the message still, regardless of it being previously installed. (In reply to Robin Johnson from comment #2) > What if it it built with USE=minimal, and then you are rebuilding with > USE=-minimal, in that case, I want to display the message still, regardless > of it being previously installed. Such check is possible in pkg_preinst(). You can save result to variable and check this variable in pkg_postinst(). pkg_preinst() { ! has_version net-nds/openldap || has_version "net-nds/openldap[minimal]" OPENLDAP_PRINT_MESSAGES=$((! $?)) } pkg_postinst() { if ((${OPENLDAP_PRINT_MESSAGES})); then elog ... fi } thanks Arfrever, implemented now, with slight tweak |