local-lib: create and use a local lib/ for perl modules with PERL5LIB. See documentation
- The Core Planners: chef-core-planners@chef.io
Library package
Library packages can be set as runtime or build time dependencies, however they are typically used as buildtime dependencies. See Defining your dependencies for more information.
To add core/local-lib as a dependency, you can add one of the following to your plan file.
pkg_build_deps=(core/local-lib)
pkg_deps=(core/local-lib)
To install this plan, run the following command:
hab pkg install core/local-lib
hab pkg install core/local-lib
» Installing core/local-lib
☁ Determining latest version of core/local-lib in the 'stable' channel
→ Found newer installed version (core/local-lib/2.000019/20200924111202) than remote version (core/local-lib/2.000019/20200404014333)
→ Using core/local-lib/2.000019/20200924111202
To view the library files first get the habitat installation directory
hab pkg path core/local-lib
/hab/pkgs/core/local-lib/2.000019/20200924111202
Then list the libraries, for example:
find $(hab pkg path core/local-lib)/lib -type f
/hab/pkgs/core/local-lib/2.000019/20200924111202/lib/perl5/local/lib.pm
/hab/pkgs/core/local-lib/2.000019/20200924111202/lib/perl5/lib/core/only.pm
/hab/pkgs/core/local-lib/2.000019/20200924111202/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
/hab/pkgs/core/local-lib/2.000019/20200924111202/lib/perl5/x86_64-linux-thread-multi/auto/local/lib/.packlist
/hab/pkgs/core/local-lib/2.000019/20200924111202/lib/perl5/POD2/DE/local/lib.pod
/hab/pkgs/core/local-lib/2.000019/20200924111202/lib/perl5/POD2/PT_BR/local/lib.pod