From e9b6b9e539ff88cbe37aea0d43e9970209338293 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sat, 16 Mar 2013 19:22:13 +0200 Subject: [PATCH 1/1] op_osupgrade: rework update script --- recipes/pandora-system/pandora-scripts.bb | 2 +- .../pandora-scripts/op_osupgrade.sh | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/recipes/pandora-system/pandora-scripts.bb b/recipes/pandora-system/pandora-scripts.bb index da824ae..acb3a0f 100644 --- a/recipes/pandora-system/pandora-scripts.bb +++ b/recipes/pandora-system/pandora-scripts.bb @@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" DEPENDS = "zenity dbus" RDEPENDS = "zenity dbus" -PR = "r136" +PR = "r137" SRC_URI = " \ file://op_paths.sh \ diff --git a/recipes/pandora-system/pandora-scripts/op_osupgrade.sh b/recipes/pandora-system/pandora-scripts/op_osupgrade.sh index 14cc71f..197433e 100644 --- a/recipes/pandora-system/pandora-scripts/op_osupgrade.sh +++ b/recipes/pandora-system/pandora-scripts/op_osupgrade.sh @@ -22,14 +22,20 @@ Aborting." exit 1 fi +rm -f /tmp/upgrade_ok kernelmd5_old=`md5sum $kernel_path` +# reminder: don't use '&&' '||' ... after tee, it breaks set -e, no idea why terminal -x bash -c \ - 'echo "Updating package lists..." && \ - opkg update 2>&1 | tee /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \ - echo "Checking for updated packages..." && \ - opkg upgrade 2>&1 | tee -a /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \ - touch /tmp/upgrade_ok || sleep 3' + '( set -e; \ + cd /tmp/; \ + echo "Updating package lists..."; \ + opkg update 2>&1; \ + echo "Checking for updated packages..."; \ + opkg upgrade 2>&1; \ + touch /tmp/upgrade_ok; \ + sync ) | tee /tmp/upgrade.log; \ + test -e /tmp/upgrade_ok || sleep 3' sync -- 2.39.2