Merge lp:~thumper/juju-core/find-jujud into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1471 |
Proposed branch: | lp:~thumper/juju-core/find-jujud |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~thumper/juju-core/local-provider-bootstrap |
Diff against target: |
394 lines (+234/-24) 6 files modified
environs/localstorage/storage.go (+7/-1) environs/localstorage/storage_test.go (+18/-1) environs/tools/build.go (+106/-15) environs/tools/build_test.go (+93/-0) environs/tools/export_test.go (+2/-0) environs/tools/storage.go (+8/-7) |
To merge this branch: | bzr merge lp:~thumper/juju-core/find-jujud |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+174918@code.launchpad.net |
Commit message
Use pre-built jujud if found.
Instead of rebuilding jujud everytime we want to upload some tools, try to
find jujud next to the juju being executed.
Description of the change
Use pre-built jujud if found.
Instead of rebuilding jujud everytime we want to upload some tools, try to
find jujud next to the juju being executed.
When we are uploading tools, we are running the juju command. The
juju executable is normally (when we build it and in the package
version) next to the jujud executable. So, what we do is start with
os.Args[0] and try to find the full path for it. There are three
situations here:
1. arg[0] is an absolute path, if so, return it
2. arg[0] is a relative path, if so, join it to the current working
directory, clean that and return it
3. arg[0] is just the command, in which case, walk the path looking
for an executable file that matches.
Amazingly, there is no os.CopyFile, so you have to mangle it yourself.
Reviewers: mp+174918_ code.launchpad. net,
Message:
Please take a look.
Description:
Use pre-built jujud if found.
Instead of rebuilding jujud everytime we want to upload some tools, try
to
find jujud next to the juju being executed.
When we are uploading tools, we are running the juju command. The
juju executable is normally (when we build it and in the package
version) next to the jujud executable. So, what we do is start with
os.Args[0] and try to find the full path for it. There are three
situations here:
1. arg[0] is an absolute path, if so, return it
2. arg[0] is a relative path, if so, join it to the current working
directory, clean that and return it
3. arg[0] is just the command, in which case, walk the path looking
for an executable file that matches.
Amazingly, there is no os.CopyFile, so you have to mangle it yourself.
https:/ /code.launchpad .net/~thumper/ juju-core/ find-jujud/ +merge/ 174918
Requires: /code.launchpad .net/~thumper/ juju-core/ local-provider- bootstrap/ +merge/ 174913
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/11326043/
Affected files: localstorage/ storage. go tools/build. go tools/storage. go
A [revision details]
M environs/
M environs/
M environs/