Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Dec 2012 15:37:17 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r244908 - projects/portbuild/scripts
Message-ID:  <201212311537.qBVFbHsd057241@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: linimon (doc,ports committer)
Date: Mon Dec 31 15:37:17 2012
New Revision: 244908
URL: http://svnweb.freebsd.org/changeset/base/244908

Log:
  Make this match the style of some other changes.  Add a comment about
  the untested fallback probably being wrong.

Modified:
  projects/portbuild/scripts/buildproxy

Modified: projects/portbuild/scripts/buildproxy
==============================================================================
--- projects/portbuild/scripts/buildproxy	Mon Dec 31 15:35:00 2012	(r244907)
+++ projects/portbuild/scripts/buildproxy	Mon Dec 31 15:37:17 2012	(r244908)
@@ -66,9 +66,11 @@ BUILDPROXY_SOCKET_FILE = config.get( 'BU
 PORTBUILD_USER = config.get( 'PORTBUILD_USER' )
 PORTBUILD_GROUP = config.get( 'PORTBUILD_GROUP' )
 
-portbuild_uid = PORTBUILD_USER
-if not portbuild_uid:
-    portbuild_uid = "ports-" + arch
+portbuild_user = PORTBUILD_USER
+if not portbuild_user:
+    # XXX MCL 20121229 probably does not work.
+    portbuild_user = "ports-" + arch
+portbuild_uid = getuidbyname( PORTBUILD_USER )
 
 if os.path.exists(BUILDPROXY_SOCKET_FILE):
     os.unlink(BUILDPROXY_SOCKET_FILE)
@@ -77,10 +79,10 @@ s.bind(BUILDPROXY_SOCKET_FILE)
 os.chmod(BUILDPROXY_SOCKET_FILE, 0600)
 if PORTBUILD_USER:
     if PORTBUILD_GROUP:
-        os.chown(BUILDPROXY_SOCKET_FILE, getuidbyname(PORTBUILD_USER), getgidbyname(PORTBUILD_GROUP))
+        os.chown(BUILDPROXY_SOCKET_FILE, portbuild_uid, getgidbyname(PORTBUILD_GROUP))
         os.chmod(BUILDPROXY_SOCKET_FILE, 0660)
     else:
-        os.chown(BUILDPROXY_SOCKET_FILE, getuidbyname(PORTBUILD_USER), -1)
+        os.chown(BUILDPROXY_SOCKET_FILE, portbuild_uid, -1)
 
 s.listen(10)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212311537.qBVFbHsd057241>