Changeset 260859 in webkit


Ignore:
Timestamp:
Apr 28, 2020 5:26:31 PM (4 years ago)
Author:
Lauro Moura
Message:

[GTK] update-webkitgtk-libs: TypeError: cannot use a string pattern on a bytes-like object
https://bugs.webkit.org/show_bug.cgi?id=211144

Reviewed by Michael Catanzaro.

Unconditionally decode the output from the 'id' command to make it
work with python3.

Also check if the doc directory exists before passing it to bwrap.
Should avoid errors like these:

bwrap: Can't find source path /run/user/1000/doc: No such file or directory

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r260841 r260859  
     12020-04-28  Lauro Moura  <lmoura@igalia.com>
     2
     3        [GTK] update-webkitgtk-libs: TypeError: cannot use a string pattern on a bytes-like object
     4        https://bugs.webkit.org/show_bug.cgi?id=211144
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Unconditionally decode the output from the 'id' command to make it
     9        work with python3.
     10
     11        Also check if the doc directory exists before passing it to bwrap.
     12        Should avoid errors like these:
     13
     14        bwrap: Can't find source path /run/user/1000/doc: No such file or directory
     15
     16        * flatpak/flatpakutils.py:
     17        (WebkitFlatpak.run_in_sandbox):
     18
    1192020-04-28  Kate Cheney  <katherine_cheney@apple.com>
    220
  • trunk/Tools/flatpak/flatpakutils.py

    r260811 r260859  
    662662            try:
    663663                with open(os.devnull, 'w') as devnull:
    664                     uid = subprocess.check_output(("id", "-u"), stderr=devnull).strip()
    665                     flatpak_command.append("--bind-mount=/run/user/{uid}/doc=/run/user/{uid}/doc".format(uid=uid))
     664                    uid = subprocess.check_output(("id", "-u"), stderr=devnull).strip().decode()
     665                    uid_doc_path = '/run/user/{uid}/doc'.format(uid=uid)
     666                    if os.path.exists(uid_doc_path):
     667                        flatpak_command.append("--bind-mount={uid_doc_path}={uid_doc_path}".format(uid_doc_path=uid_doc_path))
     668                    else:
     669                        _log.debug("Can't find user document path at '{uid_doc_path}'. Not mounting it.".format(uid_doc_path=uid_doc_path))
    666670            except subprocess.CalledProcessError:
    667671                pass
Note: See TracChangeset for help on using the changeset viewer.