1 |
commit: b2797114262b5a238e002897cb504c1c6ad5d1d5 |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> |
3 |
AuthorDate: Thu Sep 12 02:17:14 2019 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 12 15:36:25 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2797114 |
7 |
|
8 |
sys-apps/systemd: Add pkg_preinst check for system layout with USE="-split-usr". |
9 |
|
10 |
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
sys-apps/systemd/systemd-243.ebuild | 16 ++++++++++++++++ |
14 |
sys-apps/systemd/systemd-9999.ebuild | 16 ++++++++++++++++ |
15 |
2 files changed, 32 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/systemd/systemd-243.ebuild b/sys-apps/systemd/systemd-243.ebuild |
18 |
index d38227b0738..267a18fcc1c 100644 |
19 |
--- a/sys-apps/systemd/systemd-243.ebuild |
20 |
+++ b/sys-apps/systemd/systemd-243.ebuild |
21 |
@@ -419,6 +419,22 @@ save_enabled_units() { |
22 |
|
23 |
pkg_preinst() { |
24 |
save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@××××.service |
25 |
+ |
26 |
+ if ! use split-usr; then |
27 |
+ local dir |
28 |
+ for dir in bin sbin lib; do |
29 |
+ if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
30 |
+ eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
31 |
+ eerror "One of them should be a symbolic link to the other one." |
32 |
+ FAIL=1 |
33 |
+ fi |
34 |
+ done |
35 |
+ if [[ ${FAIL} ]]; then |
36 |
+ eerror "Migration to system layout with merged directories must be performed before" |
37 |
+ eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
38 |
+ die "System layout with split directories still used" |
39 |
+ fi |
40 |
+ fi |
41 |
} |
42 |
|
43 |
pkg_postinst() { |
44 |
|
45 |
diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild |
46 |
index d38227b0738..267a18fcc1c 100644 |
47 |
--- a/sys-apps/systemd/systemd-9999.ebuild |
48 |
+++ b/sys-apps/systemd/systemd-9999.ebuild |
49 |
@@ -419,6 +419,22 @@ save_enabled_units() { |
50 |
|
51 |
pkg_preinst() { |
52 |
save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@××××.service |
53 |
+ |
54 |
+ if ! use split-usr; then |
55 |
+ local dir |
56 |
+ for dir in bin sbin lib; do |
57 |
+ if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
58 |
+ eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
59 |
+ eerror "One of them should be a symbolic link to the other one." |
60 |
+ FAIL=1 |
61 |
+ fi |
62 |
+ done |
63 |
+ if [[ ${FAIL} ]]; then |
64 |
+ eerror "Migration to system layout with merged directories must be performed before" |
65 |
+ eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
66 |
+ die "System layout with split directories still used" |
67 |
+ fi |
68 |
+ fi |
69 |
} |
70 |
|
71 |
pkg_postinst() { |