[eclipse-yocto] [neon][PATCH 1/2] setup.sh: add P2 debug trace option

Tim Orling timothy.t.orling at linux.intel.com
Mon Dec 17 08:48:09 PST 2018



> On Dec 13, 2018, at 10:55 AM, Chin Huat Ang <chin.huat.ang at intel.com> wrote:
> 
> Add new option for turning on P2 debug traces to enable troubleshooting
> P2 mirrors related issues such as when downloading installation units
> (IUs). These trace options are documented here:
> 
>  https://wiki.eclipse.org/Equinox/p2/TracingOptions
> 
> To run setup.sh with P2 debug traces enable for -installIU operation:
> 
>  P2_INSTALL_DEBUG=1 ./setup.sh

I’m inclined to call this option P2_INSTALL_TRACE and have it turned on by default. We should add a new option to ./setup.sh ‘--quiet’ which turns it off. This means we do not need to change the autobuilder scripts and that by default we get more information during the “build" (similar to what Maven gives).
> 
> Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
> ---
> scripts/debug.ini | 2 ++
> scripts/setup.sh  | 6 ++++++
> 2 files changed, 8 insertions(+)
> create mode 100644 scripts/debug.ini
> 
> diff --git a/scripts/debug.ini b/scripts/debug.ini
> new file mode 100644
> index 0000000..ee240af
> --- /dev/null
> +++ b/scripts/debug.ini
> @@ -0,0 +1,2 @@
> +org.eclipse.equinox.p2.core/debug=true
> +org.eclipse.equinox.p2.core/artifacts/mirrors=true
> diff --git a/scripts/setup.sh b/scripts/setup.sh
> index 1450407..d493c5a 100755
> --- a/scripts/setup.sh
> +++ b/scripts/setup.sh
> @@ -209,6 +209,9 @@ check_local_version()
>   return 0
> }
> 
> +# Don't enable P2 debug traces by default
> +P2_INSTALL_DEBUG=${P2_INSTALL_DEBUG:=0}
> +
> # install a feature with version requirement [min, max]
> #$1: reporsitory url
> #$2: featureId
> @@ -233,8 +236,11 @@ update_feature_remote()
>   fi
> 
>   [ "x$installIU" = "x" ] && err_exit 1 "Can NOT find candidates of $2 version($3, $4) at $1!"
> +  [ "$P2_INSTALL_DEBUG" == "1" ] && DEBUG_OPTS="-debug ./debug.ini”

Here I am inclined to use “P2_INSTALL_TRACE” and “TRACE_OPTS” and “./trace.ini”. I realize upstream calls this -debug, but for our purposes we would rather have MORE output on the auto builder.

> +
>   installIU="$2/$installIU"
>   java ${PROXY_PARAM} -jar ${LAUNCHER} \
> +    $DEBUG_OPTS \
>     -application org.eclipse.equinox.p2.director \
>     -destination ./eclipse \
>     -profile SDKProfile \
> -- 
> 2.7.4
> 
> _______________________________________________
> eclipse-yocto mailing list
> eclipse-yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/eclipse-yocto



More information about the eclipse-yocto mailing list