The Polite Prefix Manager is a package manager for installing and managing software packages in isolated "prefixes". This utility is the main point of interaction with these prefixes.
git clone ${REPOSITORY_URL}- Add this directory to the $PATH so that please can be executed anywhere. See Appendix B for instructions.
mkdir -p polite_prefix_manager/cookbookscd polite_prefix_manager/cookbooksgit clone ${COOKBOOK_URL}please install build_essentials
The please command has brief help with please -h, and extensive help with
please help. There are arguments to please which configure cache locations,
build parameters, and output formatting. There are different verbs which
perform different operations like building and installing binaries, construct
dependency graphs, and remove installed binaries.
There are two caches which are particularly relevant. ~/.cache/polite
contains binary_cache and resource_cache. binary_cache contains cached
binary artifacts to avoid compilation time in updating things. It is easily
invalidated, but may save a lot of time. resource_cache contains cached
downloaded artifacts. It provides resiliency to origin resources being
unavailable, and avoids download time in updating the Prefix.
please -p /tmp/Prefix_${CUSTOM_NAME} install ${PACKAGE_UNDER_TEST} will
rebuild the Prefix in the new location, swapping in the components which you've
already compiled from your binary and resource caches.
Clearing the resource cache (or using a different location) should only be necessary to verify that all resources still exist at their specified public locations. Since the payloads are bit-accurate to verified versions (via SHA sum) there is no worry about payload accuracy.
Clearing the binary cache (or using a different location) may be necessary if a build depends on environment variables or optional dependencies autodetected in the environment. Most of the time the binary cache is invalidated by changes to the install script or build tools, and are generally robust.
The first generation of PolitePrefixManager has not been made open-source but is internally available within Akamai.
The $PATH variable is generally tweaked in shell configuration files like
.bashrc or .zshrc, or in .profile. Depending on how one has configured
their dotfiles, there are many likely places to add it. Possibly the most
appropriate place is .profile, as that is intended to be executed on any
interactive shell on the system, where .bashrc or .zshrc are specifically
for specific shells. Add lines like this:
# Add the Polite Prefix installer
export PATH="$HOME/git/ppm:$PATH"