Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
authorFabian Groffen <grobian@gentoo.org>
Wed, 14 Dec 2011 15:23:13 +0000 (16:23 +0100)
committerFabian Groffen <grobian@gentoo.org>
Wed, 14 Dec 2011 15:23:13 +0000 (16:23 +0100)
Conflicts:
bin/egencache
bin/phase-functions.sh
pym/portage/const.py
pym/portage/data.py
pym/portage/package/ebuild/_config/special_env_vars.py

21 files changed:
1  2 
bin/ebuild-ipc.py
bin/ebuild.sh
bin/egencache
bin/lock-helper.py
bin/phase-functions.sh
bin/repoman
man/emerge.1
pym/_emerge/Binpkg.py
pym/_emerge/actions.py
pym/_emerge/emergelog.py
pym/_emerge/main.py
pym/portage/__init__.py
pym/portage/const.py
pym/portage/data.py
pym/portage/dbapi/vartree.py
pym/portage/output.py
pym/portage/package/ebuild/_config/special_env_vars.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/doebuild.py
pym/portage/package/ebuild/fetch.py
pym/portage/package/ebuild/prepare_build_dirs.py

Simple merge
diff --cc bin/ebuild.sh
Simple merge
diff --cc bin/egencache
Simple merge
Simple merge
index 331afc8ae5cbe8c044202522535dd196479a7523,664202ad9d29f94950472e2ac90176c35e48baf9..9aa033cba8257360e8d1ad16a9c3868cadd73204
@@@ -28,7 -29,7 +29,7 @@@ PORTAGE_READONLY_VARS="D EBUILD EBUILD_
        PORTAGE_TMPDIR PORTAGE_UPDATE_ENV PORTAGE_USERNAME \
        PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR PORTDIR_OVERLAY \
        PROFILE_PATHS REPLACING_VERSIONS REPLACED_BY_VERSION T WORKDIR \
-       PORTAGE_OVERRIDE_EPREFIX ED EROOT"
 -      __PORTAGE_TEST_HARDLINK_LOCKS"
++      __PORTAGE_TEST_HARDLINK_LOCKS ED EROOT"
  
  PORTAGE_SAVED_READONLY_VARS="A CATEGORY P PF PN PR PV PVR"
  
diff --cc bin/repoman
Simple merge
diff --cc man/emerge.1
Simple merge
index 213ced2560e538a4422ed7aa869864dea69a104d,6c70b19f0fc6aa57f823f9a9856ec84342168ee9..e6e2e21d5f78f4e0288375255c1d5c2ddf25f924
@@@ -20,9 -20,8 +21,9 @@@ from portage import _unicode_decod
  from portage import _unicode_encode
  import io
  import logging
- import shutil
+ import textwrap
  from portage.output import colorize
 +from portage.const import EPREFIX
  
  class Binpkg(CompositeTask):
  
Simple merge
Simple merge
Simple merge
Simple merge
index 2223b4c5e1bb79d1d667310122512485ae717bc5,77c68eb0dbe65496e348118ed0b80cebae94a836..aa45cb27369e5e51715a7e0a2e0a8b14dbdf1140
@@@ -190,10 -145,8 +190,10 @@@ MANIFEST2_IDENTIFIERS    = ("AUX", "MIS
  # constant should be minimal, in favor of access via the EPREFIX setting of
  # a config instance (since it's possible to contruct a config instance with
  # a different EPREFIX). Therefore, the EPREFIX constant should *NOT* be used
- # in the definition of any other contstants within this file.
+ # in the definition of any other constants within this file.
 -EPREFIX=""
 +# PREFIX LOCAL: rely on EPREFIX from autotools
 +#EPREFIX=""
 +# END PREFIX LOCAL
  
  # pick up EPREFIX from the environment if set
  if "PORTAGE_OVERRIDE_EPREFIX" in os.environ:
index f2f541fe84babe47a5a20161a5e82c6d868d7d80,cf94ab0cde7233d36fe0560f98d9bfb00e0f1b4d..5651e7d74eb48a83071d38110ca0a7a204444360
@@@ -90,16 -86,8 +90,20 @@@ def _get_global(k)
                        secpass = 2
                #Discover the uid and gid of the portage user/group
                try:
++<<<<<<< HEAD
++=======
+                       portage_uid = pwd.getpwnam(_get_global('_portage_username')).pw_uid
++>>>>>>> overlays-gentoo-org/master
                        portage_gid = grp.getgrnam(_get_global('_portage_grpname')).gr_gid
 +              except KeyError:
 +                      # PREFIX LOCAL: some sysadmins are insane, bug #344307
 +                      if _get_global('_portage_grpname').isdigit():
 +                              portage_gid = int(_get_global('_portage_grpname'))
 +                      else:
 +                              portage_gid = None
 +                      # END PREFIX LOCAL
 +              try:
 +                      portage_uid = pwd.getpwnam(_get_global('_portage_uname')).pw_uid
                        if secpass < 1 and portage_gid in os.getgroups():
                                secpass = 1
                except KeyError:
                                                pass
                                v = sorted(set(v))
  
+       # Avoid instantiating portage.settings when the desired
+       # variable is set in os.environ.
        elif k == '_portage_grpname':
-               env = getattr(portage, 'settings', os.environ)
-               # PREFIX LOCAL: use var iso hardwired 'portage'
-               v = env.get('PORTAGE_GRPNAME', PORTAGE_GROUPNAME)
-               # END PREFIX LOCAL
-       elif k == '_portage_uname':
-               env = getattr(portage, 'settings', os.environ)
-               # PREFIX LOCAL: use var iso hardwired 'portage'
-               v = env.get('PORTAGE_USERNAME', PORTAGE_USERNAME)
-               # END PREFIX LOCAL
+               v = None
+               if 'PORTAGE_GRPNAME' in os.environ:
+                       v = os.environ['PORTAGE_GRPNAME']
+               elif hasattr(portage, 'settings'):
+                       v = portage.settings.get('PORTAGE_GRPNAME')
+               if v is None:
 -                      v = 'portage'
++                      # PREFIX LOCAL: use var iso hardwired 'portage'
++                      v = PORTAGE_GROUPNAME
++                      # END PREFIX LOCAL
+       elif k == '_portage_username':
+               v = None
+               if 'PORTAGE_USERNAME' in os.environ:
+                       v = os.environ['PORTAGE_USERNAME']
+               elif hasattr(portage, 'settings'):
+                       v = portage.settings.get('PORTAGE_USERNAME')
+               if v is None:
 -                      v = 'portage'
++                      # PREFIX LOCAL: use var iso hardwired 'portage'
++                      v = PORTAGE_USERNAME
++                      # END PREFIX LOCAL
        else:
                raise AssertionError('unknown name: %s' % k)
  
@@@ -188,14 -181,13 +204,17 @@@ def _init(settings)
        initialize global variables. This allows settings to come from make.conf
        instead of requiring them to be set in the calling environment.
        """
-       if '_portage_grpname' not in _initialized_globals:
-               v = settings.get('PORTAGE_GRPNAME')
-               if v is not None:
-                       globals()['_portage_grpname'] = v
-                       _initialized_globals.add('_portage_grpname')
-       if '_portage_uname' not in _initialized_globals:
-               v = settings.get('PORTAGE_USERNAME')
-               if v is not None:
-                       globals()['_portage_uname'] = v
-                       _initialized_globals.add('_portage_uname')
+       if '_portage_grpname' not in _initialized_globals and \
+               '_portage_username' not in _initialized_globals:
 -              v = settings.get('PORTAGE_GRPNAME', 'portage')
++              # PREFIX LOCAL: use var iso hardwired 'portage'
++              v = settings.get('PORTAGE_GRPNAME', PORTAGE_GROUPNAME)
++              # END PREFIX LOCAL
+               globals()['_portage_grpname'] = v
+               _initialized_globals.add('_portage_grpname')
 -              v = settings.get('PORTAGE_USERNAME', 'portage')
++              # PREFIX LOCAL: use var iso hardwired 'portage'
++              v = settings.get('PORTAGE_USERNAME', PORTAGE_USERNAME)
++              # END PREFIX LOCAL
+               globals()['_portage_username'] = v
+               _initialized_globals.add('_portage_username')
index 09d7721d74a246c2d78f8c6b6969599a8cb5fc6b,a9a147a981fd4175e08b6c4e412877a62c834943..edc3983006b08a792c9125cc5d46d3cc864cc0e2
@@@ -27,11 -27,9 +27,12 @@@ portage.proxy.lazyimport.lazyimport(glo
        'portage.util.digraph:digraph',
        'portage.util.env_update:env_update',
        'portage.util.listdir:dircache,listdir',
+       'portage.util.movefile:movefile',
        'portage.util._dyn_libs.PreservedLibsRegistry:PreservedLibsRegistry',
        'portage.util._dyn_libs.LinkageMapELF:LinkageMapELF@LinkageMap',
 +      'portage.util._dyn_libs.LinkageMapMachO:LinkageMapMachO',
 +      'portage.util._dyn_libs.LinkageMapPeCoff:LinkageMapPeCoff',
 +      'portage.util._dyn_libs.LinkageMapXCoff:LinkageMapXCoff',
        'portage.versions:best,catpkgsplit,catsplit,cpv_getkey,pkgcmp,' + \
                '_pkgsplit@pkgsplit',
        'tarfile',
Simple merge
index a2f65057fe9a7161457da84ff449aa8ddf89177b,d6ee647e8076d3fd724a8531f0eb89296131be3f..acff99232d59133d5f804f73dca69ff0d459020b
@@@ -66,9 -66,7 +66,9 @@@ environ_whitelist += 
        "REPLACING_VERSIONS", "REPLACED_BY_VERSION",
        "ROOT", "ROOTPATH", "T", "TMP", "TMPDIR",
        "USE_EXPAND", "USE_ORDER", "WORKDIR",
-       "XARGS", "PORTAGE_OVERRIDE_EPREFIX",
+       "XARGS", "__PORTAGE_TEST_HARDLINK_LOCKS",
 +      "BPREFIX", "DEFAULT_PATH", "EXTRA_PATH",
 +      "PORTAGE_GROUP", "PORTAGE_USER",
  ]
  
  # user config variables
Simple merge
Simple merge