From: Thomas Deutschmann Date: Fri, 30 Mar 2018 23:26:49 +0000 (+0200) Subject: app-admin/collectd: Fix pkg_postinst... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a31f6aab2671f7cea5d96ff7ca0410bc82df27f4;p=gentoo.git app-admin/collectd: Fix pkg_postinst... ...to support systemd's new rootprefix. Closes: https://bugs.gentoo.org/596852 Package-Manager: Portage-2.3.26, Repoman-2.3.7 RepoMan-Options: --force --- diff --git a/app-admin/collectd/collectd-5.7.2-r1.ebuild b/app-admin/collectd/collectd-5.7.2-r2.ebuild similarity index 98% rename from app-admin/collectd/collectd-5.7.2-r1.ebuild rename to app-admin/collectd/collectd-5.7.2-r2.ebuild index aa1d44699653..9adfa6322e16 100644 --- a/app-admin/collectd/collectd-5.7.2-r1.ebuild +++ b/app-admin/collectd/collectd-5.7.2-r2.ebuild @@ -500,7 +500,7 @@ pkg_postinst() { elog " ${caps_str}+EP" elog - local systemd_unit="${EROOT}usr/lib/systemd/system/collectd.service" + local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" if [[ -e "${systemd_unit}" ]]; then caps_str="${caps[*]}" sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ @@ -509,6 +509,12 @@ pkg_postinst() { elog "CapabilityBoundingSet in '${systemd_unit}'" elog "updated to match capabilities set above." elog + else + if has_version "sys-apps/systemd"; then + # Bug 596852 + ewarn "Failed to update CapabilityBondingSet in '${systemd_unit}'" + ewarn "because unit was not found. Please file a bug about this." + fi fi fi fi