]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker/utils: Drop custom 'interactive' variables list and store environment in BB_OR...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 5 Feb 2013 16:02:03 +0000 (16:02 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Feb 2013 13:09:54 +0000 (13:09 +0000)
Maintining hardcoded lists of user environmental variables is hacky,
replace these with the savedenv datastore. Allow access to that
through the BB_ORIGENV variable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py
lib/bb/utils.py

index 34fbfb0701d9c85f7e3dc494f8ff095c61b2c84f..f70a04f4600f0d3a9ec287f82185993e936acf32 100644 (file)
@@ -185,6 +185,7 @@ class BBCooker:
 
         filtered_keys = bb.utils.approved_variables()
         bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
+        self.configuration.data.setVar("BB_ORIGENV", self.savedenv)
 
     def enableDataTracking(self):
         self.configuration.data.enableTracking()
index 83159a6465fae4cecb3d31eff40d632d2644861a..484fb2dc765f4aa5f2d16d3d253c74928779f5c9 100644 (file)
@@ -458,27 +458,6 @@ def preserved_envvars_exported():
         'USER',
     ]
 
-def preserved_envvars_exported_interactive():
-    """Variables which are taken from the environment and placed in and exported
-    from the metadata, for interactive tasks"""
-    return [
-        'COLORTERM',
-        'DBUS_SESSION_BUS_ADDRESS',
-        'DESKTOP_SESSION',
-        'DESKTOP_STARTUP_ID',
-        'DISPLAY',
-        'GNOME_KEYRING_PID',
-        'GNOME_KEYRING_SOCKET',
-        'GPG_AGENT_INFO',
-        'GTK_RC_FILES',
-        'SESSION_MANAGER',
-        'KRB5CCNAME',
-        'SSH_AUTH_SOCK',
-        'XAUTHORITY',
-        'XDG_DATA_DIRS',
-        'XDG_SESSION_COOKIE',
-    ]
-
 def preserved_envvars():
     """Variables which are taken from the environment and placed in the metadata"""
     v = [
@@ -487,7 +466,7 @@ def preserved_envvars():
         'BB_ENV_WHITELIST',
         'BB_ENV_EXTRAWHITE',
     ]
-    return v + preserved_envvars_exported() + preserved_envvars_exported_interactive()
+    return v + preserved_envvars_exported()
 
 def filter_environment(good_vars):
     """
@@ -509,10 +488,6 @@ def filter_environment(good_vars):
 
     return removed_vars
 
-def create_interactive_env(d):
-    for k in preserved_envvars_exported_interactive():
-        os.setenv(k, d.getVar(k, True))
-
 def approved_variables():
     """
     Determine and return the list of whitelisted variables which are approved