WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
187240
update-webkitgtk-flatpak fails if running with python2
https://bugs.webkit.org/show_bug.cgi?id=187240
Summary
update-webkitgtk-flatpak fails if running with python2
Fujii Hironori
Reported
2018-07-01 21:11:03 PDT
update-webkitgtk-flatpak fails if running with python2
> $ ./Tools/Scripts/update-webkitgtk-flatpak > Can't load file /tmp/tmpSabstY: Key file contains line “<HTML><HEAD>” which is not a key-value pair, group, or comment > Traceback (most recent call last): > File "./Tools/Scripts/update-webkitgtk-flatpak", line 28, in <module> > WebkitFlatpak.load_from_args(["--gtk", "--update"] + sys.argv[1:]).run() > File "./Tools/flatpak/flatpakutils.py", line 693, in run > if not self.clean_args(): > File "./Tools/flatpak/flatpakutils.py", line 586, in clean_args > repo_file="
https://dl.flathub.org/repo/flathub.flatpakrepo
")) > File "./Tools/flatpak/flatpakutils.py", line 342, in add > comment="Adding repo %s" % repo.name) > File "./Tools/flatpak/flatpakutils.py", line 235, in flatpak > return subprocess.check_output(command).decode("utf-8") > File "/usr/lib/python2.7/subprocess.py", line 223, in check_output > raise CalledProcessError(retcode, cmd, output=output) > subprocess.CalledProcessError: Command '['flatpak', 'remote-add', '--user', 'flathub', '--from', '/tmp/tmpSabstY', '--if-not-exists']' returned non-zero exit status 1
Request Error happens to retrieve "
https://dl.flathub.org/repo/flathub.flatpakrepo
". I attached the content of /tmp/tmpSabstY. Python3 can retrieve the content.
Attachments
Request Error
(1.20 KB, text/html)
2018-07-01 21:13 PDT
,
Fujii Hironori
no flags
Details
Patch
(1.90 KB, patch)
2018-07-03 03:15 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews206 for win-future
(12.80 MB, application/zip)
2018-07-03 07:21 PDT
,
EWS Watchlist
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2018-07-01 21:13:02 PDT
Created
attachment 344071
[details]
Request Error
Fujii Hironori
Comment 2
2018-07-02 01:07:34 PDT
I tested with listening
http://localhost:10003
. urllib.urlretrieve sends an invalid request. Python 2.7 urllib.urlretrieve
> GET
http://localhost:10003
HTTP/1.0 > Host: localhost:10003 > User-Agent: Python-urllib/1.17 > Accept: */*
Python 3 urllib.request.urlretrieve
> GET / HTTP/1.1 > Accept-Encoding: identity > Host: localhost:10003 > User-Agent: Python-urllib/3.6 > Connection: close
Python 2.7 urllib2.urlopen
> GET / HTTP/1.1 > Accept-Encoding: identity > Host: localhost:10003 > Connection: close > User-Agent: Python-urllib/2.7
Michael Catanzaro
Comment 3
2018-07-02 07:45:24 PDT
IMO we should change this script to always use python3 and move on. Scripts not used by Apple do not need to be compatible with python2.
Adrian Perez
Comment 4
2018-07-02 09:17:41 PDT
(In reply to Michael Catanzaro from
comment #3
)
> IMO we should change this script to always use python3 and move on. Scripts > not used by Apple do not need to be compatible with python2.
I agree that this is a perfectly valid solution in this case.
Fujii Hironori
Comment 5
2018-07-03 02:35:58 PDT
Umm, run-webdriver-tests also emits the error message:
> $ ./Tools/Scripts/run-webdriver-tests > Can't load file /tmp/tmpgWqSc3: Key file contains line “<HTML><HEAD>” which is not a key-value pair, group, or comment > Traceback (most recent call last): > File "./Tools/Scripts/run-webdriver-tests", line 73, in <module> > flatpakutils.run_in_sandbox_if_available(sys.argv) > File "./Tools/flatpak/flatpakutils.py", line 818, in run_in_sandbox_if_available > if not flatpak_runner.clean_args(): > File "./Tools/flatpak/flatpakutils.py", line 586, in clean_args > repo_file="
https://dl.flathub.org/repo/flathub.flatpakrepo
")) > File "./Tools/flatpak/flatpakutils.py", line 342, in add > comment="Adding repo %s" % repo.name) > File "./Tools/flatpak/flatpakutils.py", line 235, in flatpak > return subprocess.check_output(command).decode("utf-8") > File "/usr/lib/python2.7/subprocess.py", line 223, in check_output > raise CalledProcessError(retcode, cmd, output=output) > subprocess.CalledProcessError: Command '['flatpak', 'remote-add', '--user', 'flathub', '--from', '/tmp/tmpgWqSc3', '--if-not-exists']' returned non-zero exit status 1
Fujii Hironori
Comment 6
2018-07-03 02:38:05 PDT
(In reply to Fujii Hironori from
comment #5
)
> Umm, run-webdriver-tests also emits the error message:
May bad. this is no problem. This script seems only for GTK and WPE ports.
Fujii Hironori
Comment 7
2018-07-03 02:40:16 PDT
Umm, run-webkit-tests also emits the error message:
> $ ./Tools/Scripts/run-webkit-tests > Can't load file /tmp/tmpmf7yMP: Key file contains line “<HTML><HEAD>” which is not a key-value pair, group, or comment > Traceback (most recent call last): > File "./Tools/Scripts/run-webkit-tests", line 39, in <module> > flatpakutils.run_in_sandbox_if_available(sys.argv) > File "./Tools/flatpak/flatpakutils.py", line 818, in run_in_sandbox_if_available > if not flatpak_runner.clean_args(): > File "./Tools/flatpak/flatpakutils.py", line 586, in clean_args > repo_file="
https://dl.flathub.org/repo/flathub.flatpakrepo
")) > File "./Tools/flatpak/flatpakutils.py", line 342, in add > comment="Adding repo %s" % repo.name) > File "./Tools/flatpak/flatpakutils.py", line 235, in flatpak > return subprocess.check_output(command).decode("utf-8") > File "/usr/lib/python2.7/subprocess.py", line 223, in check_output > raise CalledProcessError(retcode, cmd, output=output) > subprocess.CalledProcessError: Command '['flatpak', 'remote-add', '--user', 'flathub', '--from', '/tmp/tmpmf7yMP', '--if-not-exists']' returned non-zero exit status 1
Fujii Hironori
Comment 8
2018-07-03 03:15:11 PDT
Created
attachment 344174
[details]
Patch
EWS Watchlist
Comment 9
2018-07-03 07:20:48 PDT
Comment on
attachment 344174
[details]
Patch
Attachment 344174
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/8423836
New failing tests: http/tests/security/contentSecurityPolicy/video-with-https-url-allowed-by-csp-media-src-star.html http/tests/security/canvas-remote-read-remote-video-redirect.html http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
EWS Watchlist
Comment 10
2018-07-03 07:21:00 PDT
Created
attachment 344185
[details]
Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Fujii Hironori
Comment 11
2018-07-03 20:15:01 PDT
Comment on
attachment 344174
[details]
Patch Clearing flags on attachment: 344174 Committed
r233494
: <
https://trac.webkit.org/changeset/233494
>
Fujii Hironori
Comment 12
2018-07-03 20:15:04 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug