diff options
Diffstat (limited to 'usr.sbin/bsdconfig/share/packages')
-rwxr-xr-x | usr.sbin/bsdconfig/share/packages/index.subr | 5 | ||||
-rwxr-xr-x | usr.sbin/bsdconfig/share/packages/packages.subr | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/bsdconfig/share/packages/index.subr b/usr.sbin/bsdconfig/share/packages/index.subr index 2e56723..61a2464 100755 --- a/usr.sbin/bsdconfig/share/packages/index.subr +++ b/usr.sbin/bsdconfig/share/packages/index.subr @@ -86,6 +86,7 @@ INDEX_FORMAT="$INDEX_FORMAT|" # disc # f_index_initialize() { + local __funcname=f_index_initialize local __var_to_set="${2:-PACKAGE_INDEX}" [ "$_INDEX_INITTED" ] && return $SUCCESS @@ -117,7 +118,9 @@ f_index_initialize() $DEVICE_TYPE_NFS) __site="file://$MOUNTPOINT" ;; esac - if ! PACKAGESITE="$__site" f_quietly pkg update; then + export PACKAGESITE="$__site" + f_dprintf "PACKAGESITE=[%s]" "$PACKAGESITE" + if ! f_eval_catch $__funcname pkg "pkg update"; then f_show_err "$msg_unable_to_update_pkg_from_selected_media" f_device_shutdown media return $FAILURE diff --git a/usr.sbin/bsdconfig/share/packages/packages.subr b/usr.sbin/bsdconfig/share/packages/packages.subr index caff7cf..f4d1934 100755 --- a/usr.sbin/bsdconfig/share/packages/packages.subr +++ b/usr.sbin/bsdconfig/share/packages/packages.subr @@ -1013,9 +1013,9 @@ f_package_extract() # Request the package be added via pkg-install(8) if f_debugging; then - pkg -d install -y "$name" + f_eval_catch $funcname pkg 'pkg -d install -y "%s"' "$name" else - f_quietly pkg install -y "$name" + f_eval_catch $funcname pkg 'pkg install -y "%s"' "$name" fi if [ $? -ne $SUCCESS ]; then $alert "$msg_pkg_install_apparently_did_not_like_the_package" \ @@ -1144,9 +1144,9 @@ f_package_delete() # f_show_info "$msg_uninstalling_package_waiting_for_pkg_delete" "$name" if f_debugging; then - pkg -d delete -y "$name" + f_eval_catch $funcname pkg 'pkg -d delete -y "%s"' "$name" else - f_quietly pkg delete -y "$name" + f_eval_catch $funcname pkg 'pkg delete -y "%s"' "$name" fi if [ $? -ne $SUCCESS ]; then f_show_msg "$msg_pkg_delete_failed" "$name" |