simplify package_install_context and isLibraryWriteable