net-misc/chrony: don't show elog when not needed
authorSam James (sam_c) <sam@cmpct.info>
Sat, 2 May 2020 10:42:18 +0000 (12:42 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Sat, 2 May 2020 10:43:31 +0000 (12:43 +0200)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
net-misc/chrony/chrony-3.5-r4.ebuild
net-misc/chrony/chrony-4.0_pre2-r1.ebuild
net-misc/chrony/chrony-9999.ebuild

index a7a99b957db450836d6ce9825c20413594b49d99..fa28cf69009778aad44d79a511dd57de90961af1 100644 (file)
@@ -164,7 +164,7 @@ pkg_preinst() {
 pkg_postinst() {
        tmpfiles_process chronyd.conf
 
-       if use caps && ! ${HAD_CAPS}; then
+       if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then
                ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp"
                ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony"
                ewarn "This is necessary for chrony to drop privileges"
index 322eeb9249442f6713a08f39ec6632ca34f4603b..0338e59678bc9b1ebcb43c5d8a4df7b2e6f375e2 100644 (file)
@@ -190,7 +190,7 @@ pkg_preinst() {
 pkg_postinst() {
        tmpfiles_process chronyd.conf
 
-       if use caps && ! ${HAD_CAPS}; then
+       if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then
                ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp"
                ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony"
                ewarn "This is necessary for chrony to drop privileges"
index 322eeb9249442f6713a08f39ec6632ca34f4603b..0338e59678bc9b1ebcb43c5d8a4df7b2e6f375e2 100644 (file)
@@ -190,7 +190,7 @@ pkg_preinst() {
 pkg_postinst() {
        tmpfiles_process chronyd.conf
 
-       if use caps && ! ${HAD_CAPS}; then
+       if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then
                ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp"
                ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony"
                ewarn "This is necessary for chrony to drop privileges"