From: Zac Medico Date: Tue, 6 Apr 2010 16:56:23 +0000 (-0700) Subject: Remove PORTAGE_USERNAME and PORTAGE_GROUPNAME support for now since antarus X-Git-Tag: v2.2_rc68~668 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=61b4b9854495e0b6c134a2087c86141f85af1add;p=portage.git Remove PORTAGE_USERNAME and PORTAGE_GROUPNAME support for now since antarus says he wants it to work via make.conf, requiring redesign. --- diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index b743cefa0..9299f2c71 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -557,11 +557,11 @@ save_ebuild_env() { PORTAGE_BINPKG_TAR_OPTS PORTAGE_BINPKG_TMPFILE PORTAGE_BUILDDIR \ PORTAGE_COLORMAP PORTAGE_CONFIGROOT PORTAGE_DEBUG \ PORTAGE_DEPCACHEDIR PORTAGE_GID \ - PORTAGE_GROUPNAME PORTAGE_INST_GID \ + PORTAGE_INST_GID \ PORTAGE_INST_UID PORTAGE_LOG_FILE PORTAGE_MASTER_PID \ PORTAGE_NONFATAL PORTAGE_QUIET \ PORTAGE_REPO_NAME PORTAGE_RESTRICT PORTAGE_UPDATE_ENV \ - PORTAGE_USERNAME PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR \ + PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR \ PORTDIR_OVERLAY ${!PORTAGE_SANDBOX_*} PREROOTPATH \ PROFILE_PATHS PWORKDIR QA_INTERCEPTORS \ RC_DEFAULT_INDENT RC_DOT_PATTERN RC_ENDCOL \ diff --git a/pym/portage/const.py b/pym/portage/const.py index 4171b9999..2c5e233f1 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -65,9 +65,6 @@ BASH_BINARY = "/bin/bash" MOVE_BINARY = "/bin/mv" PRELINK_BINARY = "/usr/sbin/prelink" -PORTAGE_GROUPNAME = os.environ.get("PORTAGE_GROUPNAME", 'portage') -PORTAGE_USERNAME = os.environ.get("PORTAGE_USERNAME", 'portage') - INVALID_ENV_FILE = "/etc/spork/is/not/valid/profile.env" REPO_NAME_FILE = "repo_name" REPO_NAME_LOC = "profiles" + "/" + REPO_NAME_FILE diff --git a/pym/portage/data.py b/pym/portage/data.py index ff23dbe00..893663195 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -3,7 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 import os, sys, pwd, grp, platform -from portage.const import PORTAGE_GROUPNAME, PORTAGE_USERNAME import portage portage.proxy.lazyimport.lazyimport(globals(), @@ -77,8 +76,8 @@ except KeyError: #Discover the uid and gid of the portage user/group try: - portage_uid = pwd.getpwnam(PORTAGE_USERNAME)[2] - portage_gid = grp.getgrnam(PORTAGE_GROUPNAME)[2] + portage_uid = pwd.getpwnam('portage')[2] + portage_gid = grp.getgrnam('portage')[2] if secpass < 1 and portage_gid in os.getgroups(): secpass=1 except KeyError: @@ -106,7 +105,7 @@ else: from subprocess import getstatusoutput except ImportError: from commands import getstatusoutput - mystatus, myoutput = getstatusoutput("id -G %s" % PORTAGE_USERNAME) + mystatus, myoutput = getstatusoutput("id -G %s" % 'portage') if mystatus == os.EX_OK: for x in myoutput.split(): try: diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 7b54d9a46..3d02cd0a8 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -178,13 +178,13 @@ class config(object): "PORTAGE_BIN_PATH", "PORTAGE_BUILDDIR", "PORTAGE_COLORMAP", "PORTAGE_CONFIGROOT", "PORTAGE_DEBUG", "PORTAGE_DEPCACHEDIR", - "PORTAGE_GID", "PORTAGE_GROUPNAME", + "PORTAGE_GID", "PORTAGE_INST_GID", "PORTAGE_INST_UID", "PORTAGE_IUSE", "PORTAGE_LOG_FILE", "PORTAGE_MASTER_PID", "PORTAGE_PYM_PATH", "PORTAGE_QUIET", "PORTAGE_REPO_NAME", "PORTAGE_RESTRICT", - "PORTAGE_TMPDIR", "PORTAGE_UPDATE_ENV", "PORTAGE_USERNAME", + "PORTAGE_TMPDIR", "PORTAGE_UPDATE_ENV", "PORTAGE_VERBOSE", "PORTAGE_WORKDIR_MODE", "PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", "PROFILE_PATHS", "ROOT", "ROOTPATH", "T", "TMP", "TMPDIR",