As a follow-up, here's a much smaller version of the above patch.
Thanks go to Petter for pointing me to the maintainer scripts
documentation.

diff -r 9e5e6d9f91b1 debian/monkeysphere.postinst
--- a/debian/monkeysphere.postinst	Sat Jun 28 14:54:59 2014 -0500
+++ b/debian/monkeysphere.postinst	Sat Jun 28 14:55:33 2014 -0500
@@ -21,12 +21,15 @@
 		monkeysphere
 	fi
 
-	# try all available transitions:
+	# try all *necessary* transitions
 	for trans in 0.23 0.28 ; do
+        if [[ "$2" == "" ]] || [[ "$trans" <= "$2" ]]
+        then
 	    /usr/share/monkeysphere/transitions/$trans || { \
 		    RET=$?
 		    echo "Failed running transition script " \
                 "/usr/share/monkeysphere/transitions/$trans" >&2
 		    exit $RET
 	    }
+        fi
 	done

Reply via email to