[m-rev.] diff: deep profiler install & permissions

Zoltan Somogyi zs at csse.unimelb.edu.au
Fri Jun 6 19:03:13 AEST 2008


deep_profiler/Mmakefile:
	Don't try to install the deep profiler in the CGI directory
	if the user doesn't have write permission there.

Zoltan.

cvs diff: Diffing deep_profiler
Index: deep_profiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/Mmakefile,v
retrieving revision 1.27
diff -u -b -r1.27 Mmakefile
--- deep_profiler/Mmakefile	8 Dec 2007 15:29:02 -0000	1.27
+++ deep_profiler/Mmakefile	29 May 2008 03:04:41 -0000
@@ -211,17 +211,21 @@
 	# fail during a first-time installation. The rm is before the move
 	# in case this is the third or later installation.
 	-if test $(ENABLE_DEEP_PROFILER) = yes ; then \
+		if test -w $(INSTALL_CGI_DIR) ; then \
 		rm -f $(INSTALL_CGI_DIR)/mdprof_cgi.was ; \
 		mv -f $(INSTALL_CGI_DIR)/mdprof_cgi \
 			$(INSTALL_CGI_DIR)/mdprof_cgi.was ; \
 		cp mdprof_cgi $(INSTALL_CGI_DIR) ; \
+		else \
+			echo "cannot install mdprof_cgi: " \
+				"$(INSTALL_CGI_DIR) is not writeable" \
+		fi \
 	fi
 	# We also install mdprof_cgi in $(INSTALL_MERC_BIN_DIR).
-	# This is done just so that it can easily get put in the
-	# binary distribution (even if the step above failed).
-	# It's useful for mdprof_test and mdprof_dump to avaiable when
-	# debugging problems with the deep profiler so we install them as
-	# well.
+	# This is done just so that it can easily get put in the binary
+	# distribution (even if the step above failed). It is useful for
+	# mdprof_test and mdprof_dump to be available when debugging problems
+	# with the deep profiler, so we install them as well.
 	-[ -d $(INSTALL_MERC_BIN_DIR) ] || mkdir -p $(INSTALL_MERC_BIN_DIR)
 	cp `vpath_find mdprof_cgi$(EXT_FOR_EXE)` \
 		$(INSTALL_MERC_BIN_DIR)/mdprof_cgi
cvs diff: Diffing deep_profiler/notes
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list