[eclipse-yocto] [oxygen][PATCH v2 1/4] setup.sh: add P2 debug trace option

Chin Huat Ang chin.huat.ang at intel.com
Tue Dec 18 20:54:56 PST 2018


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

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 58a60d1..1010235 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
@@ -242,8 +245,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"
+
   installIU="$2/$installIU"
   java ${PROXY_PARAM} -jar ${LAUNCHER} \
+    $DEBUG_OPTS \
     -application org.eclipse.equinox.p2.director \
     -destination ./eclipse \
     -profile SDKProfile \
-- 
2.7.4



More information about the eclipse-yocto mailing list