commit:     e35d715ebd098067176566bd065ee65340b5ed6a
Author:     Richard Freeman <rich0 <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 16 14:45:15 2023 +0000
Commit:     Richard Freeman <rich0 <AT> gentoo <DOT> org>
CommitDate: Wed Aug 16 14:45:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e35d715e

sys-process/systemd-cron: use split-usr USE flag to detect split usr

This approach is the same as used by sys-apps/systemd-9999.

Signed-off-by: Richard Freeman <rich0 <AT> gentoo.org>

 sys-process/systemd-cron/systemd-cron-1.16.7-r1.ebuild | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/sys-process/systemd-cron/systemd-cron-1.16.7-r1.ebuild 
b/sys-process/systemd-cron/systemd-cron-1.16.7-r1.ebuild
index e44362e5d6bf..c94d705a9f69 100644
--- a/sys-process/systemd-cron/systemd-cron-1.16.7-r1.ebuild
+++ b/sys-process/systemd-cron/systemd-cron-1.16.7-r1.ebuild
@@ -12,7 +12,7 @@ 
SRC_URI="https://github.com/systemd-cron/${PN}/archive/v${PV}.tar.gz -> systemd-
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
-IUSE="cron-boot etc-crontab-systemd minutely +runparts setgid test yearly"
+IUSE="cron-boot etc-crontab-systemd minutely +runparts setgid split-usr test 
yearly"
 RESTRICT="!test? ( test )"
 
 RDEPEND=">=sys-apps/systemd-217
@@ -29,9 +29,15 @@ DEPEND="sys-process/cronbase
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-src_prepare() {
-       [[ -L /bin ]] || die "systemd-cron requires a merged /usr"
+pkg_pretend() {
+       if use split-usr; then
+                       eerror "Please complete the migration to merged-usr."
+                       eerror "https://wiki.gentoo.org/wiki/Merge-usr";
+                       die "systemd no longer supports split-usr"
+       fi
+}
 
+src_prepare() {
        python_fix_shebang --force "${S}/src/bin"
 
        sed -i \

Reply via email to