From eb75c63c197e58a334e6b81c0f1f4dcddd7f127c Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Tue, 22 Nov 2022 13:44:05 +0100 Subject: [PATCH 1/2] Activate pipeline failure for p2 install operations Despite the grep command/pipeline --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index 58ec096..41ca01a 100755 --- a/build.sh +++ b/build.sh @@ -93,11 +93,13 @@ install_packages () { chmod +x $ECLIPSE_BIN_PATH fi + set -o pipefail $ECLIPSE_BIN_PATH -nosplash \ -application org.eclipse.equinox.p2.director \ -repository "$1" \ -installIU "$(parse_package_list $2)" \ | grep -v 'DEBUG' + set +o pipefail } # Displays the given input including "=> " on the console. From d94c005b5c1fd438a95c63834d5742047d4e0c02 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Tue, 22 Nov 2022 15:44:56 +0100 Subject: [PATCH 2/2] Adds Xtext uninstall step for old version in Eclipse DSL distro --- build.sh | 22 ++++++++++++++++++++++ packages/xtext-uninstall-packages.list | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 packages/xtext-uninstall-packages.list diff --git a/build.sh b/build.sh index 41ca01a..999de19 100755 --- a/build.sh +++ b/build.sh @@ -102,6 +102,21 @@ install_packages () { set +o pipefail } +# Uninstalls a given list of packages. +uninstall_packages () { + if [[ "$OS" = "macos" ]]; then + chmod +x $ECLIPSE_BIN_PATH + fi + + set -o pipefail + $ECLIPSE_BIN_PATH -nosplash \ + -application org.eclipse.equinox.p2.director \ + -repository "$1" \ + -uninstallIU "$(parse_package_list $2)" \ + | grep -v 'DEBUG' + set +o pipefail +} + # Displays the given input including "=> " on the console. log () { echo "=> $1" @@ -262,6 +277,13 @@ for p in ${ORDER[@]}; do log "Skipping plug-in: $p." continue fi + + # Check if Xtext (old version) must be uninstalled first. + if [[ "$p" = "xtext" ]]; then + log "Uninstalling plug-in: $p." + uninstall_packages "$UPDATESITES" "./packages/$p-uninstall-packages.list" + fi + log "Installing plug-in: $p." install_packages "$UPDATESITES" "./packages/$p-packages.list" done diff --git a/packages/xtext-uninstall-packages.list b/packages/xtext-uninstall-packages.list new file mode 100644 index 0000000..190205e --- /dev/null +++ b/packages/xtext-uninstall-packages.list @@ -0,0 +1,21 @@ +org.eclipse.xtend.sdk.feature.group +org.eclipse.xtext.docs.feature.group +org.eclipse.xtext.examples.feature.group +org.eclipse.xtext.redist.feature.group +org.eclipse.xtext.runtime.feature.group +org.eclipse.xtext.sdk.feature.group +org.eclipse.xtext.ui.feature.group +org.eclipse.xtext.xbase.feature.group +org.eclipse.xtext.xtext.ui.feature.group +org.eclipse.xtext.xtext.ui.graph.feature.group +org.eclipse.xtext.docs.feature.group +org.eclipse.xtext.examples.feature.group +org.eclipse.xtext.redist.feature.group +org.eclipse.xtext.runtime.feature.group +org.eclipse.xtext.sdk.feature.group +org.eclipse.xtext.ui.feature.group +org.eclipse.xtext.xbase.feature.group +org.eclipse.xtext.xbase.lib.feature.group +org.eclipse.xtext.xtext.ui.feature.group +org.eclipse.emf.mwe2.language.ui +org.eclipse.emf.mwe2.language.sdk.feature.group