Revision: 819 http://trac.macosforge.org/projects/darwinbuild/changeset/819 Author: wsiegrist@apple.com Date: 2010-05-03 11:44:56 -0700 (Mon, 03 May 2010) Log Message: ----------- Return an error code when install routine cannot find the target archive. Modified Paths: -------------- branches/PR-7935095/darwinup/Depot.cpp branches/PR-7935095/testing/darwinup/run-tests.sh Modified: branches/PR-7935095/darwinup/Depot.cpp =================================================================== --- branches/PR-7935095/darwinup/Depot.cpp 2010-05-03 18:36:05 UTC (rev 818) +++ branches/PR-7935095/darwinup/Depot.cpp 2010-05-03 18:44:56 UTC (rev 819) @@ -673,6 +673,7 @@ } } else { fprintf(stdout, "Archive not found: %s\n", path); + return -1; } return res; Modified: branches/PR-7935095/testing/darwinup/run-tests.sh =================================================================== --- branches/PR-7935095/testing/darwinup/run-tests.sh 2010-05-03 18:36:05 UTC (rev 818) +++ branches/PR-7935095/testing/darwinup/run-tests.sh 2010-05-03 18:44:56 UTC (rev 819) @@ -241,6 +241,19 @@ echo "DIFF: diffing original test files to dest (should be no diffs) ..." $DIFF $ORIG $DEST 2>&1 +echo "========== TEST: Try to upgrade with non-existent file =============" +$DARWINUP install $PREFIX/root5 +mv $PREFIX/root5 $PREFIX/root5.tmp +set +e +$DARWINUP upgrade $PREFIX/root5 +set -e +C=$($DARWINUP list | grep root5 | wc -l | xargs) +test "$C" == "1" +mv $PREFIX/root5.tmp $PREFIX/root5 +$DARWINUP uninstall oldest +echo "DIFF: diffing original test files to dest (should be no diffs) ..." +$DIFF $ORIG $DEST 2>&1 + echo "========== TEST: Superseded =============" $DARWINUP install $PREFIX/root5 $DARWINUP install $PREFIX/root6