Message ID | 1457318739-22993-3-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 2bdeade0eac66e7b12db847ffbbcbe2e63a17fd4 |
Delegated to: | Simon Glass |
Headers | show |
On Sun, Mar 6, 2016 at 8:45 PM, Simon Glass <sjg@chromium.org> wrote: > It is convenient to install symlinks to buildman and patman in the search > patch, such as /usr/local/bin. But when this is done, the -H option fails to > work because it looks in the directory containing the symlink instead of its > target. Fix this. > > Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
On 7 March 2016 at 09:44, Joe Hershberger <joe.hershberger@gmail.com> wrote: > On Sun, Mar 6, 2016 at 8:45 PM, Simon Glass <sjg@chromium.org> wrote: >> It is convenient to install symlinks to buildman and patman in the search >> patch, such as /usr/local/bin. But when this is done, the -H option fails to >> work because it looks in the directory containing the symlink instead of its >> target. Fix this. >> >> Signed-off-by: Simon Glass <sjg@chromium.org> > > Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Applied to u-boot-dm/next
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 8b3cd30..c2c54bf 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -101,7 +101,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, pager = os.getenv('PAGER') if not pager: pager = 'more' - fname = os.path.join(os.path.dirname(sys.argv[0]), 'README') + fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), + 'README') command.Run(pager, fname) return 0 diff --git a/tools/patman/patman.py b/tools/patman/patman.py index d05c5ff..fe50eb4 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -117,7 +117,8 @@ elif options.full_help: pager = os.getenv('PAGER') if not pager: pager = 'more' - fname = os.path.join(os.path.dirname(sys.argv[0]), 'README') + fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), + 'README') command.Run(pager, fname) # Process commits, produce patches files, check them, email them
It is convenient to install symlinks to buildman and patman in the search patch, such as /usr/local/bin. But when this is done, the -H option fails to work because it looks in the directory containing the symlink instead of its target. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/buildman/control.py | 3 ++- tools/patman/patman.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)