Skip to content

pkg-register ignores failed pre-install/post-install scripts #2073

@jhgit

Description

@jhgit

If the pre-install or post-install script for a package fails, pkg register ignores the failure. pkg add dies as I would expect.

Looking in like libpkg/pkg_ports:pkg_add_port(), indeed the functions that are invoked to run the scripts (e.g., pkg_lua_script_run, pkg_script_run) do ignore the return code, whereas libpkg/pkg_add.c:pkg_add_common() checks the script return code.

See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206951

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions