It looks like pkg started returning exit code 1 for 'info package' when the package does not exists. Previous versions used to return 70 in the same situation. This seems to break chef automation as chef code expects either 0 or 70: https://github.com/chef/chef/blob/master/lib/chef/provider/package/freebsd/pkgng.rb#L45 It looks like there is a bug #252125 which reports a similar issue with exit code, but in a different case. I wonder if exit codes were somehow broken in the last release
a# pkg --version; pkg info pyjamas; echo $? 1.16.1 pkg: No package(s) matching pyjamas 1 b# pkg --version; pkg info pyjamas; echo $? 1.15.10 pkg: No package(s) matching pyjamas 70
* freebsd_package[mc] action remove ================================================================================ Error executing action `remove` on resource 'freebsd_package[mc]' ================================================================================ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0, 70], but received '1' ---- Begin output of ["pkg", "info", "mc"] ---- STDOUT: STDERR: pkg: No package(s) matching mc ---- End output of ["pkg", "info", "mc"] ---- Ran ["pkg", "info", "mc"] returned 1