Bug 213432 - [Flatpak SDK] relax restriction on build-webkit script name
Summary: [Flatpak SDK] relax restriction on build-webkit script name
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-20 10:42 PDT by Philippe Normand
Modified: 2020-06-23 02:16 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2020-06-20 10:45 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (2.54 KB, patch)
2020-06-22 08:15 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2020-06-20 10:42:11 PDT
I've started writing a python variant of build-webkit, called build-webkit-ng, so handle it in flatpakutils too.
Comment 1 Philippe Normand 2020-06-20 10:45:04 PDT
Created attachment 402390 [details]
Patch
Comment 2 Lauro Moura 2020-06-22 07:39:32 PDT
Comment on attachment 402390 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=402390&action=review

> Tools/flatpak/flatpakutils.py:686
> +        if args and args[0].find("build-webkit") != -1 and not self.is_branch_build():

As the index of "build-webkit" is not needed, it could be better to use `if args and "build-webkit" in args[0] and...`.

(This is even a recommendation in the find method: https://docs.python.org/3/library/stdtypes.html#str.find)

And to be more safe, maybe check against `os.path.basename(args[0])` instead of `args[0]`? (Who knows who might be using webkit inside a build-webkit directory...)
Comment 3 Philippe Normand 2020-06-22 08:15:39 PDT
Created attachment 402475 [details]
Patch
Comment 4 EWS 2020-06-23 02:15:47 PDT
Committed r263390: <https://trac.webkit.org/changeset/263390>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402475 [details].
Comment 5 Radar WebKit Bug Importer 2020-06-23 02:16:18 PDT
<rdar://problem/64632745>