Gentoo Archives: gentoo-dev

From: Conrad Kostecki <conrad@××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] eclass/webapp.eclass: fix ROOT path with EAPI=7
Date: Sun, 27 Jan 2019 19:20:59
Message-Id: 929312299.27591.1548616835503@office.mailbox.org
In Reply to: [gentoo-dev] [PATCH] eclass/webapp.eclass: fix ROOT path with EAPI=7 by conrad@kostecki.com
1 *ping* Any thoughts on this?
2
3 > conrad@××××××××.com hat am 17. November 2018 um 21:35 geschrieben:
4 >
5 >
6 > From: Conrad Kostecki <conrad@××××××××.com>
7 >
8 > Closes: https://bugs.gentoo.org/671258
9 > Signed-off-by: Conrad Kostecki <conrad@××××××××.com>
10 > ---
11 > eclass/webapp.eclass | 14 +++++++-------
12 > 1 file changed, 7 insertions(+), 7 deletions(-)
13 >
14 > diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
15 > index 8983af334ab..e11835735ca 100644
16 > --- a/eclass/webapp.eclass
17 > +++ b/eclass/webapp.eclass
18 > @@ -42,9 +42,9 @@ IS_REPLACE=0
19 > INSTALL_CHECK_FILE="installed_by_webapp_eclass"
20 > SETUP_CHECK_FILE="setup_by_webapp_eclass"
21 >
22 > -ETC_CONFIG="${ROOT}etc/vhosts/webapp-config"
23 > -WEBAPP_CONFIG="${ROOT}usr/sbin/webapp-config"
24 > -WEBAPP_CLEANER="${ROOT}usr/sbin/webapp-cleaner"
25 > +ETC_CONFIG="${ROOT%/}/etc/vhosts/webapp-config"
26 > +WEBAPP_CONFIG="${ROOT%/}/usr/sbin/webapp-config"
27 > +WEBAPP_CLEANER="${ROOT%/}/usr/sbin/webapp-cleaner"
28 >
29 > # ==============================================================================
30 > # INTERNAL FUNCTIONS
31 > @@ -365,7 +365,7 @@ webapp_src_preinst() {
32 > # @DESCRIPTION:
33 > # The default pkg_setup() for this eclass. This will gather required variables
34 > # from webapp-config and check if there is an application installed to
35 > -# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
36 > +# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
37 > #
38 > # You need to call this function BEFORE anything else has run in your custom
39 > # pkg_setup().
40 > @@ -389,7 +389,7 @@ webapp_pkg_setup() {
41 > G_HOSTNAME="localhost"
42 > webapp_read_config
43 >
44 > - local my_dir="${ROOT}${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
45 > + local my_dir="${ROOT%/}/${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
46 >
47 > # if USE=vhosts is enabled OR no application is installed we're done here
48 > if ! has vhosts ${IUSE} || use vhosts || [[ ! -d "${my_dir}" ]]; then
49 > @@ -453,7 +453,7 @@ webapp_src_install() {
50 > # @FUNCTION: webapp_pkg_postinst
51 > # @DESCRIPTION:
52 > # The default pkg_postinst() for this eclass. This installs the web application to
53 > -# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
54 > +# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
55 > # display a short notice how to install this application with webapp-config.
56 > #
57 > # You need to call this function AFTER everything else has run in your custom
58 > @@ -464,7 +464,7 @@ webapp_pkg_postinst() {
59 > webapp_read_config
60 >
61 > # sanity checks, to catch bugs in the ebuild
62 > - if [[ ! -f "${ROOT}${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
63 > + if [[ ! -f "${ROOT%/}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
64 > eerror
65 > eerror "This ebuild did not call webapp_src_install() at the end"
66 > eerror "of the src_install() function"
67 > --
68 > 2.19.1
69 >
70 >
71
72 Conrad Kostecki