Don't set os.environ["USERLAND"] inside portage.data and rely on USERLAND from the...
authorZac Medico <zmedico@gentoo.org>
Thu, 5 Apr 2007 21:20:57 +0000 (21:20 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 5 Apr 2007 21:20:57 +0000 (21:20 -0000)
svn path=/main/trunk/; revision=6341

bin/etc-update
pym/emerge/__init__.py
pym/portage/__init__.py
pym/portage/data.py

index ab376b83c1a78e9f8514bb32e34205525299808d..bf1d0139bf4519a2032b330cc00cf477db111461 100755 (executable)
@@ -386,7 +386,7 @@ Please select from the menu above (-1 to exit, losing this merge): "
                        my_input=$(read_int)
                        case ${my_input} in
                                1) echo "Replacing ${ofile} with ${mfile}"
-                                  if [[ ${USERLAND} == GNU ]]; then
+                                  if [[ ${USERLAND:-GNU} == GNU ]]; then
                                       chmod --reference="${ofile}" "${mfile}"
                                   else
                                       chmod $(stat -f %Mp%Lp "${ofile}") "${mfile}"
index 980eff38658c54fb5e8c463a73229bbdf4acdbda..313098ca9ce819124539dee5f56fa6fcb4149d5b 100644 (file)
@@ -5145,8 +5145,10 @@ def parse_opts(tmpcmdline, silent=False):
 def validate_ebuild_environment(trees):
        for myroot in trees:
                mysettings = trees[myroot]["vartree"].settings
-               if not mysettings.get("ARCH", None):
-                       print >> sys.stderr, bad("\a!!! ARCH is not set... " + \
+               for var in "ARCH", "USERLAND":
+                       if mysettings.get(var):
+                               continue
+                       print >> sys.stderr, bad(("\a!!! %s is not set... " % var) + \
                                "Are you missing the '%setc/make.profile' symlink?" % \
                                mysettings["PORTAGE_CONFIGROOT"])
                        print >> sys.stderr, bad("\a!!! Is the symlink correct? " + \
index 2b954254a83d771385ac8176efa25667d9b381b2..3e09e99929567c1d3b7a9c365b5c5948f76e3f38 100644 (file)
@@ -914,10 +914,6 @@ class config:
 
                        # backupenv is for calculated incremental variables.
                        self.backupenv = os.environ.copy()
-                       if not local_config:
-                               # Clean up pollution from portage.data so that it doesn't
-                               # interfere with repoman.
-                               self.backupenv.pop("USERLAND", None)
 
                        def check_var_directory(varname, var):
                                if not os.path.isdir(var):
@@ -1160,10 +1156,6 @@ class config:
 
                        self.configlist.append(os.environ.copy())
                        self.configdict["env"]=self.configlist[-1]
-                       if not local_config:
-                               # Clean up pollution from portage.data so that it doesn't
-                               # interfere with repoman.
-                               self.configdict["env"].pop("USERLAND", None)
 
                        # make lookuplist for loading package.*
                        self.lookuplist=self.configlist[:]
index 3caef1b2c6663d8701c55bd78a93895e1b0b2a02..fbd419b28119e374119d527c94209e40e8c2eac2 100644 (file)
@@ -44,8 +44,6 @@ if not lchown:
                                        " exist.  Please rebuild python.\n", noiselevel=-1)
                        lchown()
 
-os.environ["USERLAND"]=userland
-
 def portage_group_warning():
        warn_prefix = bad("*** WARNING ***  ")
        mylines = [