Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/baikal/
Date: Thu, 07 Jan 2021 15:31:36
Message-Id: 1610033488.280c4f83d84818e3ba4391b1c7f69f8711870e39.grobian@gentoo
1 commit: 280c4f83d84818e3ba4391b1c7f69f8711870e39
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 7 15:31:23 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 7 15:31:28 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=280c4f83
7
8 www-apps/baikal: use relative symlink to config
9
10 Package-Manager: Portage-3.0.12, Repoman-3.0.2
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 www-apps/baikal/baikal-0.7.2.ebuild | 22 +++++++++++++---------
14 1 file changed, 13 insertions(+), 9 deletions(-)
15
16 diff --git a/www-apps/baikal/baikal-0.7.2.ebuild b/www-apps/baikal/baikal-0.7.2.ebuild
17 index 39d0aca079d..373282d259b 100644
18 --- a/www-apps/baikal/baikal-0.7.2.ebuild
19 +++ b/www-apps/baikal/baikal-0.7.2.ebuild
20 @@ -1,4 +1,4 @@
21 -# Copyright 1999-2020 Gentoo Authors
22 +# Copyright 1999-2021 Gentoo Authors
23 # Distributed under the terms of the GNU General Public License v2
24
25 EAPI="7"
26 @@ -34,15 +34,19 @@ src_install() {
27 einfo "Setting up container for configuration"
28 dodir /etc/${PN}
29
30 - einfo "Fixing symlinks"
31 - local link target
32 - find "${D}${MY_HTDOCSDIR}" -type l | while read link ; do
33 - target=$(readlink "${link}")
34 - target=${target/..\/Core/Core}
35 - rm "${link}" && ln -s "${target}" "${link}"
36 + # setup config in /etc
37 + # we are not allowed to use straight-forward absolute symlink :(
38 + local root path htdocsdir=${MY_HTDOCSDIR%/}
39 + while [[ -n ${htdocsdir} ]] ; do
40 + root+="../"
41 + htdocsdir=${htdocsdir%/*}
42 + # trim duplicate slashes
43 + while [[ ${htdocsdir} == */ ]] ; do
44 + htdocsdir=${htdocsdir%/}
45 + done
46 done
47 - dosym /etc/${PN} "${MY_HTDOCSDIR}"/Specific
48 - dosym /etc/${PN} "${MY_HTDOCSDIR}"/config
49 + dosym ${root%/}/etc/${PN} "${MY_HTDOCSDIR}"/Specific
50 + dosym ${root%/}/etc/${PN} "${MY_HTDOCSDIR}"/config
51 dosym . "${MY_HTDOCSDIR}"/html
52
53 webapp_postinst_txt en "${FILESDIR}/postinstall-v0.7-en.txt"