summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2019-09-12 02:17:14 +0000
committerMike Gilbert <floppym@gentoo.org>2019-09-12 11:36:25 -0400
commitb2797114262b5a238e002897cb504c1c6ad5d1d5 (patch)
tree065403d5648b9035fc53dda506c6ff9265785a23 /sys-apps
parentsys-apps/systemd: Improve description of "cgroup-hybrid" USE flag. (diff)
downloadgentoo-b2797114262b5a238e002897cb504c1c6ad5d1d5.tar.gz
gentoo-b2797114262b5a238e002897cb504c1c6ad5d1d5.tar.bz2
gentoo-b2797114262b5a238e002897cb504c1c6ad5d1d5.zip
sys-apps/systemd: Add pkg_preinst check for system layout with USE="-split-usr".
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/systemd/systemd-243.ebuild16
-rw-r--r--sys-apps/systemd/systemd-9999.ebuild16
2 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/systemd/systemd-243.ebuild b/sys-apps/systemd/systemd-243.ebuild
index d38227b0738b..267a18fcc1cf 100644
--- a/sys-apps/systemd/systemd-243.ebuild
+++ b/sys-apps/systemd/systemd-243.ebuild
@@ -419,6 +419,22 @@ save_enabled_units() {
pkg_preinst() {
save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@tty1.service
+
+ if ! use split-usr; then
+ local dir
+ for dir in bin sbin lib; do
+ if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then
+ eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged."
+ eerror "One of them should be a symbolic link to the other one."
+ FAIL=1
+ fi
+ done
+ if [[ ${FAIL} ]]; then
+ eerror "Migration to system layout with merged directories must be performed before"
+ eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage."
+ die "System layout with split directories still used"
+ fi
+ fi
}
pkg_postinst() {
diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
index d38227b0738b..267a18fcc1cf 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -419,6 +419,22 @@ save_enabled_units() {
pkg_preinst() {
save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@tty1.service
+
+ if ! use split-usr; then
+ local dir
+ for dir in bin sbin lib; do
+ if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then
+ eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged."
+ eerror "One of them should be a symbolic link to the other one."
+ FAIL=1
+ fi
+ done
+ if [[ ${FAIL} ]]; then
+ eerror "Migration to system layout with merged directories must be performed before"
+ eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage."
+ die "System layout with split directories still used"
+ fi
+ fi
}
pkg_postinst() {