Internal functions that are common to several functions in FSA.

.onAttach(lib, pkg, ...)