Bug 40207 - VCSUtils.pm functions return wrong value when current dir is not in WebKit
Summary: VCSUtils.pm functions return wrong value when current dir is not in WebKit
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: https://trac.webkit.org/browser/trunk...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-05 18:53 PDT by Jeff Johnson
Modified: 2010-07-22 07:05 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnson 2010-06-05 18:53:37 PDT
For ease of use, I have my local WebKit/WebKitTools/Scripts directory in my $PATH, so that for example I can just do "build-webkit" from the command line to build Webkit. However, this means that my current working directory could be anywhere on my local filesystem, not necessarily in the WebKit directory. The problem is that a number of functions in WebKitTools/Scripts/VCSUtils.pm return the wrong value when a script is run while the cwd is not WebKit.

I've discovered that this bug is the underlying cause of another bug:

https://bugs.webkit.org/show_bug.cgi?id=26642

If you run the set-webkit-configuration script while the current working directory is WebKit, it works fine. However, if you run the script while the current working directory is $HOME, for example, the script doesn't work right, which leads to the bug above.

Some of the functions that return the wrong values are isGit(), gitBranch(), and isGitBranchBuild().

The correct behavior would be to start with the directory of the running script itself instead of the current working directory. It seems that "wekitdirs.pm" is able to find the baseProductDir just fine, even if a script such as build-webkit is run while the cwd is $HOME.