Unreviewed, WPE build fix after r239028
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 15:14:51 +0000 (15:14 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 15:14:51 +0000 (15:14 +0000)
The FLATPAK_USER_DIR env var is not set early enough, leading to:

Traceback (most recent call last):
File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>
  sys.exit(WebkitFlatpak.load_from_args().run())
File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run
  if not self.clean_args():
File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args
  _log.debug("Using flatpak user dir: %s" % os.environ["FLATPAK_USER_DIR"])
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
  raise KeyError(key)
KeyError: 'FLATPAK_USER_DIR'

* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/flatpak/flatpakutils.py

index 3284e27..a0892c6 100644 (file)
@@ -1,3 +1,23 @@
+2018-12-11  Philippe Normand  <pnormand@igalia.com>
+
+        Unreviewed, WPE build fix after r239028
+
+        The FLATPAK_USER_DIR env var is not set early enough, leading to:
+
+        Traceback (most recent call last):
+        File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>
+          sys.exit(WebkitFlatpak.load_from_args().run())
+        File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run
+          if not self.clean_args():
+        File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args
+          _log.debug("Using flatpak user dir: %s" % os.environ["FLATPAK_USER_DIR"])
+        File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
+          raise KeyError(key)
+        KeyError: 'FLATPAK_USER_DIR'
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.clean_args):
+
 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
 
         Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
index 715a37a..41440ed 100644 (file)
@@ -570,6 +570,12 @@ class WebkitFlatpak:
         self.icc_version = None
 
     def clean_args(self):
+        os.environ["FLATPAK_USER_DIR"] = os.environ.get("WEBKIT_FLATPAK_USER_DIR", os.path.realpath(os.path.join(scriptdir, "../../WebKitBuild", "UserFlatpak")))
+        try:
+            os.makedirs(os.environ["FLATPAK_USER_DIR"])
+        except OSError as e:
+            pass
+
         configure_logging(logging.DEBUG if self.verbose else logging.INFO)
         _log.debug("Using flatpak user dir: %s" % os.environ["FLATPAK_USER_DIR"])
 
@@ -593,12 +599,6 @@ class WebkitFlatpak:
         self.manifest_path = os.path.abspath(os.path.join(scriptdir, '../flatpak/org.webkit.WebKit.yaml'))
         self.build_name = self.name + "-generated"
 
-        os.environ["FLATPAK_USER_DIR"] = os.environ.get("WEBKIT_FLATPAK_USER_DIR", os.path.realpath(os.path.join(scriptdir, "../../WebKitBuild", "UserFlatpak")))
-        try:
-            os.makedirs(os.environ["FLATPAK_USER_DIR"])
-        except OSError as e:
-            pass
-
         build_root = os.path.join(self.source_root, 'WebKitBuild')
         self.flatpak_build_path = os.path.join(build_root, self.platform, "FlatpakTree" + self.build_type)
         self.cache_path = os.path.join(build_root, "FlatpakCache")