Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Add install subcommand #42

Closed
gerkey opened this issue Aug 13, 2015 · 4 comments
Closed

Add install subcommand #42

gerkey opened this issue Aug 13, 2015 · 4 comments

Comments

@gerkey
Copy link
Contributor

gerkey commented Aug 13, 2015

I propose that ament build only build and not install. A new ament install subcommand would build (which might be very quick if everything is built) and install. In other words, follow the make and make install pattern.

I realize that this separation of steps is already possible by using the --skip-build and --skip-install options to ament build. I also realize that it's not recommended that I try to actually use the result of the build step (this is the case with lots of software). But as it currently stands, the default behavior of ament build is different from the default behavior of every other command-line build tool I've used.

@dirk-thomas
Copy link
Contributor

Can you describe how build should work for more than one package without installing anything?

@wjwwood
Copy link
Contributor

wjwwood commented Aug 13, 2015

Maybe the name should be different, but as @dirk-thomas is hinting at without taking the time to explain is that ament build builds and then installs each package in turn. If you don't install a package then you cannot build the next. Put another way, building a package without installing it is not sufficient to build more packages on top of it. Therefore if ament build only built a package then conceptually it would only work on one package at a time or it would only work after install had been run at least once on all packages (and then any changes in rebuilt packages would not affect downstream packages since the compiled changes were not installed).

catkin build behaves the same way, and so that's probably where the name sake comes from.

@gerkey
Copy link
Contributor Author

gerkey commented Aug 13, 2015

Thanks for the explanation, @wjwwood. Yeah, I see the problem. Hmm...I guess that what ament is doing just doesn't map well onto my established notions of a build tool (which in the end are centered around make).

Then, what does my workflow look like if I want to install into a system location, without compiling as root?

@gerkey
Copy link
Contributor Author

gerkey commented Aug 13, 2015

As we just discussed, the closest thing to the workflow I'm describing would be something like:

# Build (and, because it can't be avoided, install locally)
ament build
# Install to a system location (which should not build anything)
sudo ament build --skip-build --install-space /usr

That's still not quite right, because I really want to sudo install each package as it's built, then build the next one on top of that system install. In fact, I would guess that the above procedure would actually end up rebuilding packages during the install, with sudo permissions.

I'll open another ticket to describe @wjwwood's more complete solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants