-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg-register ignores failed pre-install/post-install scripts #2073
Comments
Here are the problems:
They just ignore the return code. Boils down to: Lines 1359 to 1362 in 6c55d7b
Lines 1215 to 1234 in 6c55d7b
|
michael-o
added a commit
to michael-o/pkg
that referenced
this issue
Mar 1, 2023
…#2073) When a package is registered through pkg-register(8) the return codes of pre-install and post-install scripts and lua files are ignored. Now they are respected as with pkg-add(8). This fixes freebsd#2073
michael-o
added a commit
to michael-o/pkg
that referenced
this issue
Mar 1, 2023
…-register(8) (freebsd#2073) When a package is registered through pkg-register(8) the return codes of pre-install and post-install scripts and lua files are ignored. Now they are respected as with pkg-add(8). This fixes freebsd#2073
michael-o
added a commit
to michael-o/pkg
that referenced
this issue
Mar 1, 2023
…-register(8) (freebsd#2073) When a package is registered through pkg-register(8) the return codes of pre-install and post-install scripts and lua files are ignored. Now they are respected as with pkg-add(8). This fixes freebsd#2073
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: