From owner-svn-src-user@FreeBSD.ORG Thu Jun 2 00:58:21 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BA94106564A; Thu, 2 Jun 2011 00:58:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ECE68FC08; Thu, 2 Jun 2011 00:58:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p520wLHZ094048; Thu, 2 Jun 2011 00:58:21 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p520wL3H094046; Thu, 2 Jun 2011 00:58:21 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201106020058.p520wL3H094046@svn.freebsd.org> From: Doug Barton Date: Thu, 2 Jun 2011 00:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222590 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2011 00:58:21 -0000 Author: dougb Date: Thu Jun 2 00:58:20 2011 New Revision: 222590 URL: http://svn.freebsd.org/changeset/base/222590 Log: We want to make sure that $TMPDIR exists before trying to use it. The cheapest way to do this is to just call mkdir -p. Move the umask call before this to be safe. Split the test for the existence of /usr/X11R6 and whether or not it's a link for one more micro-optimization. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Thu Jun 2 00:43:16 2011 (r222589) +++ user/dougb/portmaster/portmaster Thu Jun 2 00:58:20 2011 (r222590) @@ -5,15 +5,17 @@ trap trap_exit INT +umask 022 + # Initialize crucial values for the parent, and export them for the children if [ -z "$PM_PARENT_PID" ]; then PM_PARENT_PID=$$ - : ${TMPDIR:=/tmp} + : ${TMPDIR:=/tmp} ; /bin/mkdir -p $TMPDIR UPGRADE_TOOL=portmaster # /usr/local is needed in the path for make PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin - [ -e /usr/X11R6 -a ! -L /usr/X11R6 ] && PATH=$PATH:/usr/X11R6/bin + [ -e /usr/X11R6 ] && [ ! -L /usr/X11R6 ] && PATH=$PATH:/usr/X11R6/bin [ -n "$CCACHE_PATH" -a -z "$NOCCACHE" ] && PATH="/usr/local/libexec/ccache:$PATH" export PM_PARENT_PID TMPDIR UPGRADE_TOOL PATH @@ -44,8 +46,6 @@ if [ -z "$PM_PARENT_PID" ]; then unset euid fi -umask 022 - #=============== Begin functions we always want to have =============== version () {