[Tools] Add support for "webKitBranchBuild" git option when calculating jhbuildPath
Created attachment 205726 [details] Patch
Currently, ports that use jhbuild fail to determine jhbuild directory when "webKitBranchBuild" git configuration property is enabled. To reproduce that issue in Efl port, enable that flag in .git/config, switch to a git branch other than "master" and try to build webkit. The build will fail to locate dependencies due to lack of pkg-config paths which should be set by jhbuild. For more details about "webKitBranchBuild" option, see: https://trac.webkit.org/wiki/UsingGitWithWebKit
Created attachment 205727 [details] Patch Updated ChangeLog
Comment on attachment 205727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=205727&action=review > Tools/Scripts/webkitdirs.pm:1884 > + pop(@jhbuildPath); This line is error prone as it depends on the implementation detail that baseProductDir() always appends a "/" to the end of the base product path when it's a Git branch build by line 239 of webkitdirs.pm (r152104), <http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitdirs.pm?rev=152104#L239>. This detail is likely to change as we move towards using File::Spec operations to build a file system path instead of string concatenation to build a path. I suggest that we pop() the last directory only if it's a Git branch build and gitBranch() is a non-empty string.
(In reply to comment #4) > (From update of attachment 205727 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=205727&action=review > > > Tools/Scripts/webkitdirs.pm:1884 > > + pop(@jhbuildPath); > > This line is error prone as it depends on the implementation detail that baseProductDir() always appends a "/" to the end of the base product path when it's a Git branch build by line 239 of webkitdirs.pm (r152104), <http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitdirs.pm?rev=152104#L239>. This detail is likely to change as we move towards using File::Spec operations to build a file system path instead of string concatenation to build a path. I suggest that we pop() the last directory only if it's a Git branch build and gitBranch() is a non-empty string. Yes, you're right. I'll add that checking (non-empty gitBranch()). thanks
Created attachment 205736 [details] Patch Added checking for non-empty git branch to determine jhbuild path.
Comment on attachment 205736 [details] Patch r=me
Comment on attachment 205736 [details] Patch Clearing flags on attachment: 205736 Committed r152191: <http://trac.webkit.org/changeset/152191>
All reviewed patches have been landed. Closing bug.