public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files.
@ 2013-02-21 11:27 Michał Górny
  2013-02-21 16:26 ` Matt Turner
  2013-02-21 16:55 ` Zac Medico
  0 siblings, 2 replies; 5+ messages in thread
From: Michał Górny @ 2013-02-21 11:27 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

This makes reading them a bit easier, especially with phases run
in parallel.
---
 gx86/eclass/multilib-build.eclass | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gx86/eclass/multilib-build.eclass b/gx86/eclass/multilib-build.eclass
index feac748..93c4335 100644
--- a/gx86/eclass/multilib-build.eclass
+++ b/gx86/eclass/multilib-build.eclass
@@ -100,7 +100,8 @@ multilib_foreach_abi() {
 	local ABI
 	for ABI in $(multilib_get_enabled_abis); do
 		multilib_toolchain_setup "${ABI}"
-		BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
+		local BUILD_DIR=${initial_dir%%/}-${ABI}
+		"${@}" | tee -a "${T}/build-${ABI}.log"
 	done
 }
 
@@ -127,8 +128,8 @@ multilib_parallel_foreach_abi() {
 			multijob_child_init
 
 			multilib_toolchain_setup "${ABI}"
-			BUILD_DIR=${initial_dir%%/}-${ABI}
-			"${@}"
+			local BUILD_DIR=${initial_dir%%/}-${ABI}
+			"${@}" 2>&1 | tee -a "${T}/build-${ABI}.log"
 		) &
 
 		multijob_post_fork
-- 
1.8.1.2



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

* Re: [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files.
  2013-02-21 11:27 [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files Michał Górny
@ 2013-02-21 16:26 ` Matt Turner
  2013-02-21 16:55 ` Zac Medico
  1 sibling, 0 replies; 5+ messages in thread
From: Matt Turner @ 2013-02-21 16:26 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

On Thu, Feb 21, 2013 at 3:27 AM, Michał Górny <mgorny@gentoo.org> wrote:
> This makes reading them a bit easier, especially with phases run
> in parallel.
> ---
>  gx86/eclass/multilib-build.eclass | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gx86/eclass/multilib-build.eclass b/gx86/eclass/multilib-build.eclass
> index feac748..93c4335 100644
> --- a/gx86/eclass/multilib-build.eclass
> +++ b/gx86/eclass/multilib-build.eclass
> @@ -100,7 +100,8 @@ multilib_foreach_abi() {
>         local ABI
>         for ABI in $(multilib_get_enabled_abis); do
>                 multilib_toolchain_setup "${ABI}"
> -               BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
> +               local BUILD_DIR=${initial_dir%%/}-${ABI}
> +               "${@}" | tee -a "${T}/build-${ABI}.log"
>         done
>  }
>
> @@ -127,8 +128,8 @@ multilib_parallel_foreach_abi() {
>                         multijob_child_init
>
>                         multilib_toolchain_setup "${ABI}"
> -                       BUILD_DIR=${initial_dir%%/}-${ABI}
> -                       "${@}"
> +                       local BUILD_DIR=${initial_dir%%/}-${ABI}
> +                       "${@}" 2>&1 | tee -a "${T}/build-${ABI}.log"
>                 ) &
>
>                 multijob_post_fork
> --
> 1.8.1.2
>
>

Definitely seems like a good idea.


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

* Re: [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files.
  2013-02-21 11:27 [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files Michał Górny
  2013-02-21 16:26 ` Matt Turner
@ 2013-02-21 16:55 ` Zac Medico
  2013-02-21 17:03   ` Michał Górny
  1 sibling, 1 reply; 5+ messages in thread
From: Zac Medico @ 2013-02-21 16:55 UTC (permalink / raw
  To: gentoo-dev

On 02/21/2013 03:27 AM, Michał Górny wrote:
> This makes reading them a bit easier, especially with phases run
> in parallel.
> ---
>  gx86/eclass/multilib-build.eclass | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/gx86/eclass/multilib-build.eclass b/gx86/eclass/multilib-build.eclass
> index feac748..93c4335 100644
> --- a/gx86/eclass/multilib-build.eclass
> +++ b/gx86/eclass/multilib-build.eclass
> @@ -100,7 +100,8 @@ multilib_foreach_abi() {
>  	local ABI
>  	for ABI in $(multilib_get_enabled_abis); do
>  		multilib_toolchain_setup "${ABI}"
> -		BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
> +		local BUILD_DIR=${initial_dir%%/}-${ABI}
> +		"${@}" | tee -a "${T}/build-${ABI}.log"
>  	done
>  }
>  
> @@ -127,8 +128,8 @@ multilib_parallel_foreach_abi() {
>  			multijob_child_init
>  
>  			multilib_toolchain_setup "${ABI}"
> -			BUILD_DIR=${initial_dir%%/}-${ABI}
> -			"${@}"
> +			local BUILD_DIR=${initial_dir%%/}-${ABI}
> +			"${@}" 2>&1 | tee -a "${T}/build-${ABI}.log"
>  		) &
>  
>  		multijob_post_fork
> 

Maybe use EBUILD_DEATH_HOOKS to display the locations of the logs?
-- 
Thanks,
Zac


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

* Re: [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files.
  2013-02-21 16:55 ` Zac Medico
@ 2013-02-21 17:03   ` Michał Górny
  2013-02-21 17:16     ` Zac Medico
  0 siblings, 1 reply; 5+ messages in thread
From: Michał Górny @ 2013-02-21 17:03 UTC (permalink / raw
  To: gentoo-dev; +Cc: zmedico

[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]

On Thu, 21 Feb 2013 08:55:45 -0800
Zac Medico <zmedico@gentoo.org> wrote:

> On 02/21/2013 03:27 AM, Michał Górny wrote:
> > This makes reading them a bit easier, especially with phases run
> > in parallel.
> > ---
> >  gx86/eclass/multilib-build.eclass | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/gx86/eclass/multilib-build.eclass b/gx86/eclass/multilib-build.eclass
> > index feac748..93c4335 100644
> > --- a/gx86/eclass/multilib-build.eclass
> > +++ b/gx86/eclass/multilib-build.eclass
> > @@ -100,7 +100,8 @@ multilib_foreach_abi() {
> >  	local ABI
> >  	for ABI in $(multilib_get_enabled_abis); do
> >  		multilib_toolchain_setup "${ABI}"
> > -		BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
> > +		local BUILD_DIR=${initial_dir%%/}-${ABI}
> > +		"${@}" | tee -a "${T}/build-${ABI}.log"
> >  	done
> >  }
> >  
> > @@ -127,8 +128,8 @@ multilib_parallel_foreach_abi() {
> >  			multijob_child_init
> >  
> >  			multilib_toolchain_setup "${ABI}"
> > -			BUILD_DIR=${initial_dir%%/}-${ABI}
> > -			"${@}"
> > +			local BUILD_DIR=${initial_dir%%/}-${ABI}
> > +			"${@}" 2>&1 | tee -a "${T}/build-${ABI}.log"
> >  		) &
> >  
> >  		multijob_post_fork
> > 
> 
> Maybe use EBUILD_DEATH_HOOKS to display the locations of the logs?

Is this documented somewhere?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

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

* Re: [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files.
  2013-02-21 17:03   ` Michał Górny
@ 2013-02-21 17:16     ` Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2013-02-21 17:16 UTC (permalink / raw
  To: gentoo development

On 02/21/2013 09:03 AM, Michał Górny wrote:
> On Thu, 21 Feb 2013 08:55:45 -0800
> Zac Medico <zmedico@gentoo.org> wrote:
>> Maybe use EBUILD_DEATH_HOOKS to display the locations of the logs?
> 
> Is this documented somewhere?

No, it doesn't seem to be documented in PMS, though some eclasses have
been using it for a very long time. See java-utils-2, multiprocessing,
and toolchain eclasses. It's also used in the sys-apps/sandbox and
www-client/chromium ebuilds.

Portage documents the related register_die_hook function in `man 5 ebuild`.
-- 
Thanks,
Zac


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

end of thread, other threads:[~2013-02-21 17:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-21 11:27 [gentoo-dev] [PATCH multilib-build] Tee the build logs to ABI-specific files Michał Górny
2013-02-21 16:26 ` Matt Turner
2013-02-21 16:55 ` Zac Medico
2013-02-21 17:03   ` Michał Górny
2013-02-21 17:16     ` Zac Medico

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