Пример #1
0
def set_permissions_by_spec(path, spec):
    # Get permissions for spec
    if os.path.isdir(path):
        perms = pp.get_package_dir_permissions(spec)
    else:
        perms = pp.get_package_permissions(spec)
    group = pp.get_package_group(spec)

    set_permissions(path, perms, group)
Пример #2
0
def post_install(spec):
    if not spec.external:
        perms = get_package_permissions(spec)
        dir_perms = get_package_dir_permissions(spec)
        group = get_package_group(spec)

        forall_files(spec.prefix, chmod_real_entries, [perms], [dir_perms])

        if group:
            forall_files(spec.prefix, chgrp, [group])