public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] eclass/webapp.eclass: fix ROOT path with EAPI=7
@ 2018-11-17 20:35 conrad
  2019-01-27 19:20 ` Conrad Kostecki
  0 siblings, 1 reply; 2+ messages in thread
From: conrad @ 2018-11-17 20:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Conrad Kostecki

From: Conrad Kostecki <conrad@kostecki.com>

Closes: https://bugs.gentoo.org/671258
Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
---
 eclass/webapp.eclass | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
index 8983af334ab..e11835735ca 100644
--- a/eclass/webapp.eclass
+++ b/eclass/webapp.eclass
@@ -42,9 +42,9 @@ IS_REPLACE=0
 INSTALL_CHECK_FILE="installed_by_webapp_eclass"
 SETUP_CHECK_FILE="setup_by_webapp_eclass"
 
-ETC_CONFIG="${ROOT}etc/vhosts/webapp-config"
-WEBAPP_CONFIG="${ROOT}usr/sbin/webapp-config"
-WEBAPP_CLEANER="${ROOT}usr/sbin/webapp-cleaner"
+ETC_CONFIG="${ROOT%/}/etc/vhosts/webapp-config"
+WEBAPP_CONFIG="${ROOT%/}/usr/sbin/webapp-config"
+WEBAPP_CLEANER="${ROOT%/}/usr/sbin/webapp-cleaner"
 
 # ==============================================================================
 # INTERNAL FUNCTIONS
@@ -365,7 +365,7 @@ webapp_src_preinst() {
 # @DESCRIPTION:
 # The default pkg_setup() for this eclass. This will gather required variables
 # from webapp-config and check if there is an application installed to
-# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
+# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
 #
 # You need to call this function BEFORE anything else has run in your custom
 # pkg_setup().
@@ -389,7 +389,7 @@ webapp_pkg_setup() {
 	G_HOSTNAME="localhost"
 	webapp_read_config
 
-	local my_dir="${ROOT}${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
+	local my_dir="${ROOT%/}/${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
 
 	# if USE=vhosts is enabled OR no application is installed we're done here
 	if ! has vhosts ${IUSE} || use vhosts || [[ ! -d "${my_dir}" ]]; then
@@ -453,7 +453,7 @@ webapp_src_install() {
 # @FUNCTION: webapp_pkg_postinst
 # @DESCRIPTION:
 # The default pkg_postinst() for this eclass. This installs the web application to
-# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
+# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
 # display a short notice how to install this application with webapp-config.
 #
 # You need to call this function AFTER everything else has run in your custom
@@ -464,7 +464,7 @@ webapp_pkg_postinst() {
 	webapp_read_config
 
 	# sanity checks, to catch bugs in the ebuild
-	if [[ ! -f "${ROOT}${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
+	if [[ ! -f "${ROOT%/}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
 		eerror
 		eerror "This ebuild did not call webapp_src_install() at the end"
 		eerror "of the src_install() function"
-- 
2.19.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] [PATCH] eclass/webapp.eclass: fix ROOT path with EAPI=7
  2018-11-17 20:35 [gentoo-dev] [PATCH] eclass/webapp.eclass: fix ROOT path with EAPI=7 conrad
@ 2019-01-27 19:20 ` Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2019-01-27 19:20 UTC (permalink / raw
  To: gentoo-dev

*ping* Any thoughts on this?

> conrad@kostecki.com hat am 17. November 2018 um 21:35 geschrieben:
> 
> 
> From: Conrad Kostecki <conrad@kostecki.com>
> 
> Closes: https://bugs.gentoo.org/671258
> Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
> ---
>  eclass/webapp.eclass | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
> index 8983af334ab..e11835735ca 100644
> --- a/eclass/webapp.eclass
> +++ b/eclass/webapp.eclass
> @@ -42,9 +42,9 @@ IS_REPLACE=0
>  INSTALL_CHECK_FILE="installed_by_webapp_eclass"
>  SETUP_CHECK_FILE="setup_by_webapp_eclass"
>  
> -ETC_CONFIG="${ROOT}etc/vhosts/webapp-config"
> -WEBAPP_CONFIG="${ROOT}usr/sbin/webapp-config"
> -WEBAPP_CLEANER="${ROOT}usr/sbin/webapp-cleaner"
> +ETC_CONFIG="${ROOT%/}/etc/vhosts/webapp-config"
> +WEBAPP_CONFIG="${ROOT%/}/usr/sbin/webapp-config"
> +WEBAPP_CLEANER="${ROOT%/}/usr/sbin/webapp-cleaner"
>  
>  # ==============================================================================
>  # INTERNAL FUNCTIONS
> @@ -365,7 +365,7 @@ webapp_src_preinst() {
>  # @DESCRIPTION:
>  # The default pkg_setup() for this eclass. This will gather required variables
>  # from webapp-config and check if there is an application installed to
> -# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
> +# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
>  #
>  # You need to call this function BEFORE anything else has run in your custom
>  # pkg_setup().
> @@ -389,7 +389,7 @@ webapp_pkg_setup() {
>  	G_HOSTNAME="localhost"
>  	webapp_read_config
>  
> -	local my_dir="${ROOT}${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
> +	local my_dir="${ROOT%/}/${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
>  
>  	# if USE=vhosts is enabled OR no application is installed we're done here
>  	if ! has vhosts ${IUSE} || use vhosts || [[ ! -d "${my_dir}" ]]; then
> @@ -453,7 +453,7 @@ webapp_src_install() {
>  # @FUNCTION: webapp_pkg_postinst
>  # @DESCRIPTION:
>  # The default pkg_postinst() for this eclass. This installs the web application to
> -# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
> +# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
>  # display a short notice how to install this application with webapp-config.
>  #
>  # You need to call this function AFTER everything else has run in your custom
> @@ -464,7 +464,7 @@ webapp_pkg_postinst() {
>  	webapp_read_config
>  
>  	# sanity checks, to catch bugs in the ebuild
> -	if [[ ! -f "${ROOT}${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
> +	if [[ ! -f "${ROOT%/}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
>  		eerror
>  		eerror "This ebuild did not call webapp_src_install() at the end"
>  		eerror "of the src_install() function"
> -- 
> 2.19.1
> 
>

Conrad Kostecki


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-27 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-17 20:35 [gentoo-dev] [PATCH] eclass/webapp.eclass: fix ROOT path with EAPI=7 conrad
2019-01-27 19:20 ` Conrad Kostecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox