How Do I install a core package like rsync as part of another habitat package ?
By declaring the package as a dependency of your package.
Adding it as a dependency will install it but not binlink it .
Do you mean that when installing your package with binlinks (e.g.
hab pkg install -b yourpackage) that you wish for
core/rsync to be binlinked as well?
Does adding the below in the plan take care of it ? Please guide.
hab pkg install core/rsync -b
do_install is executed during package build, so this would not have the effect you are picturing. You should never need to run any variation of
hab pkg install in a plan.
Should I just run the command
hab pkg install core/rsync -b in one of the hooks ?
core/rsync is a dependency of your package, it will already be installed after you have installed your package. If you were to call anything in your hooks, it would be
hab pkg binlink core/rsync to create links for the package that is already present.
After installing your package, is your desire for the
rsync command to be available to humans typing on a command prompt or for the hooks in your package to have the
rsync command available on their
PATH? In other words, why do you want binlinks for a dependency?