From ba7820b18c0ee8631505f7a2a764f7222a732d44 Mon Sep 17 00:00:00 2001
From: Trygve Laugstøl <trygvis@inamo.no>
Date: Fri, 1 Nov 2013 16:24:26 +0100
Subject: bin/app-upgrade: Removing unreachable code. Fixing it so it compares
 against the currently installed version instead of the last resolved version
 which makes it possible to retry installation of the same version.
 libexec/app-install-file: Allowing installation of the same file twice.
 Checks if the file has been unpacked earlier or not. Removes the unpacked
 version on failure.

---
 test/data/app-a/hooks/post-install |  8 +++++++-
 test/data/app-a/hooks/pre-install  | 11 +++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100755 test/data/app-a/hooks/pre-install

(limited to 'test/data/app-a/hooks')

diff --git a/test/data/app-a/hooks/post-install b/test/data/app-a/hooks/post-install
index 1dfb7be..0717f2a 100755
--- a/test/data/app-a/hooks/post-install
+++ b/test/data/app-a/hooks/post-install
@@ -2,7 +2,13 @@
 
 set -u
 
-echo "Post install"
+echo "post-install"
+
+if [[ -e $APP_HOME/fail-post-install ]]
+then
+  echo "Simulating failure."
+  exit 1
+fi
 
 NAME=`basename $APP_HOME`
 
diff --git a/test/data/app-a/hooks/pre-install b/test/data/app-a/hooks/pre-install
new file mode 100755
index 0000000..4b95ac4
--- /dev/null
+++ b/test/data/app-a/hooks/pre-install
@@ -0,0 +1,11 @@
+#!/bin/bash -e
+
+set -u
+
+echo "pre-install"
+
+if [[ -e $APP_HOME/fail-pre-install ]]
+then
+  echo "Simulating failure."
+  exit 1
+fi
-- 
cgit v1.2.3