CVS java-package
Jeroen van Wolffelaar
jeroen@haydn.debian.org
Mon Jan 3 19:57:02 2005
Update of /cvsroot/pkg-java/java-package
In directory haydn:/tmp/cvs-serv18569
Modified Files:
make-jpkg
Log Message:
* Bail out if running as real root (works around the evil parts of Sun's
install script that unconditionally writes to /etc, see #266273, #280707)
--- /cvsroot/pkg-java/java-package/make-jpkg 2005/01/03 17:50:32 1.5
+++ /cvsroot/pkg-java/java-package/make-jpkg 2005/01/04 02:56:24 1.6
@@ -105,6 +105,17 @@
exit 1
fi
+# check whether I'm real root, and bail out if so... ugly, but needed
+if mkdir /java-package.$$.please-remove-me 2>/dev/null; then
+ rmdir /java-package.$$.please-remove-me
+ echo "You are real root -- unfortunately, some package install stubs" >&2
+ echo "do evil things in /etc and such, therefore it is important you" >&2
+ echo "run make-jpkg as a non-root user using fakeroot." >&2
+ echo >&2
+ echo "Aborting." >&2
+ exit 1
+fi
+
### Error handling