[eclipse-yocto] [oxygen][PATCH v3 5/6] setup.sh: generate trace.ini when required

Chin Huat Ang chin.huat.ang at intel.com
Fri Jan 11 01:35:59 PST 2019


Instead of pointing to static trace.ini which doesn't work well when the
build is not run within scripts/ directory, dynamically generate the
file in PWD to enable P2 trace messages when -q or --quiet is not set.

[YOCTO #13050 v3]

Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
---
 scripts/setup.sh  | 12 +++++++++++-
 scripts/trace.ini |  2 --
 2 files changed, 11 insertions(+), 3 deletions(-)
 delete mode 100644 scripts/trace.ini

diff --git a/scripts/setup.sh b/scripts/setup.sh
index b4ee248..73a707a 100755
--- a/scripts/setup.sh
+++ b/scripts/setup.sh
@@ -278,7 +278,17 @@ update_feature_remote()
   fi
 
   [ "x$installIU" = "x" ] && err_exit 1 "Can NOT find candidates of $2 version($3, $4) at $1!"
-  [ "$P2_INSTALL_TRACE" == "1" ] && TRACE_OPTS="-debug ./trace.ini"
+
+  TRACE_INI=`pwd`/trace.ini
+
+  if [ "$P2_INSTALL_TRACE" == "1" ]; then
+    echo "org.eclipse.equinox.p2.core/debug=true" > $TRACE_INI
+    echo "org.eclipse.equinox.p2.core/artifacts/mirrors=true" >> $TRACE_INI
+    TRACE_OPTS="-debug $TRACE_INI"
+  else
+    rm -f $TRACE_INI
+    TRACE_OPTS=
+  fi
 
   installIU="$2/$installIU"
   java ${PROXY_PARAM} -jar ${LAUNCHER} \
diff --git a/scripts/trace.ini b/scripts/trace.ini
deleted file mode 100644
index ee240af..0000000
--- a/scripts/trace.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.equinox.p2.core/debug=true
-org.eclipse.equinox.p2.core/artifacts/mirrors=true
-- 
2.7.4



More information about the eclipse-yocto mailing list