[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH systemd.eclass 2/2] Update and remove catalog database in systemd ebuild.
From:       Michał Górny <mgorny () gentoo ! org>
Date:       2012-12-29 10:52:35
Message-ID: 1356778355-30324-2-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=449102
---
 gx86/sys-apps/systemd/systemd-9999.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gx86/sys-apps/systemd/systemd-9999.ebuild b/gx86/sys-apps/systemd/systemd-9999.ebuild
index ae3feb7..42f1cef 100644
--- a/gx86/sys-apps/systemd/systemd-9999.ebuild
+++ b/gx86/sys-apps/systemd/systemd-9999.ebuild
@@ -205,6 +205,8 @@ optfeature() {
 }
 
 pkg_postinst() {
+	systemd_update_catalog
+
 	mkdir -p "${ROOT}"/run || ewarn "Unable to mkdir /run, this could mean trouble."
 	if [[ ! -L "${ROOT}"/etc/mtab ]]; then
 		ewarn "Upstream suggests that the /etc/mtab file should be a symlink to /proc/mounts."
@@ -230,3 +232,10 @@ pkg_postinst() {
 	ewarn "	init=/sbin/init"
 	ewarn "to your kernel to boot using sysvinit / OpenRC."
 }
+
+pkg_prerm() {
+	# If removing systemd completely, remove the catalog database.
+	if [[ ! ${REPLACED_BY_VERSION} ]]; then
+		rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
+	fi
+}
-- 
1.8.0.2


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic