Use dpv(1) in `bsdconfig packages'

This commit is contained in:
Devin Teske 2016-01-27 00:12:58 +00:00
parent c4ba688294
commit 22fc021043
3 changed files with 14 additions and 9 deletions

View File

@ -1,5 +1,5 @@
# Copyright (c) 2012 Ron McDowell
# Copyright (c) 2012-2013 Devin Teske
# Copyright (c) 2012-2016 Devin Teske
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -60,6 +60,7 @@ msg_biology_desc="Software related to biology."
msg_bootstrapping_pkg="Bootstrapping pkg(8)..."
msg_brazil="Brazil"
msg_building_package_menus="Building package menu(s)..."
msg_building_package_main_menu="Building package main menu..."
msg_cad_desc="Computer Aided Design utilities."
msg_canada="Canada"
msg_cancel="Cancel"
@ -201,7 +202,6 @@ msg_linux_desc="Linux programs that can run under binary compatibility."
msg_lisp_desc="Software related to the Lisp language."
msg_lithuania="Lithuania"
msg_loading_of_dependent_package_failed="Loading of dependent package %s failed"
msg_located_index_now_reading_package_data_from_it="Located INDEX, now reading package data from it..."
msg_logging_in_to_user_at_host="Logging in to %s@%s.."
msg_looking_for_keymap_files="Looking for keymap files..."
msg_looking_up_host="Looking up host %s"
@ -313,6 +313,7 @@ msg_proceed="Proceed"
msg_processing_selection="Processing selection..."
msg_python_desc="Software related to the Python language."
msg_quick_start_how_to_use_this_menu_system="Quick start - How to use this menu system"
msg_reading_package_index_data="Reading package index data"
msg_reinstall="Reinstall"
msg_reinstall_desc="Mark this package for reinstall"
msg_release_name="Release Name"

View File

@ -162,8 +162,6 @@ f_index_initialize()
fi
) < "$PACKAGES_INDEX_CACHEFILE" 2> /dev/null
)'; then
f_show_info \
"$msg_located_index_now_reading_package_data_from_it"
if ! f_index_read "$__var_to_set"; then
f_show_err \
"$msg_io_or_format_error_on_index_file"
@ -179,8 +177,11 @@ f_index_initialize()
# If we reach this point, we need to generate the data from scratch
#
f_show_info "$msg_generating_index_from_pkg_database"
eval "$__var_to_set"='$( pkg rquery -I | sort )'
eval "$__var_to_set"='$( pkg rquery -I | (
exec 2<&1; dpv -ko /dev/stderr >&$TERMINAL_STDOUT_PASSTHRU \
-b "$DIALOG_BACKTITLE" \
-- "$msg_generating_index_from_pkg_database"
) | sort )'
#
# Attempt to create the persistant on-disk cache
@ -204,7 +205,6 @@ f_index_initialize()
"$__tmpfile" "$PACKAGES_INDEX_CACHEFILE"
fi
f_show_info "$msg_located_index_now_reading_package_data_from_it"
if ! f_index_read "$__var_to_set"; then
f_show_err "$msg_io_or_format_error_on_index_file"
return $FAILURE
@ -329,7 +329,9 @@ f_index_read()
sub(/^ /, "", category_list)
print "PACKAGE_CATEGORIES=\"" category_list "\""
}' )" # End-Quote
}' | ( exec 2<&1; dpv -ko /dev/stderr >&$TERMINAL_STDOUT_PASSTHRU \
-b "$DIALOG_BACKTITLE" -- "$msg_reading_package_index_data"
) )" # End-Quote
}
# f_index_extract_pages $var_to_get $var_basename $pagesize [$category]

View File

@ -1,6 +1,6 @@
if [ ! "$_PACKAGES_PACKAGES_SUBR" ]; then _PACKAGES_PACKAGES_SUBR=1
#
# Copyright (c) 2013 Devin Teske
# Copyright (c) 2013-2016 Devin Teske
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -668,6 +668,8 @@ f_package_config()
# CATEGORY_MENU_LIST _categories_{varpkg} _rundeps_{varpkg}
# PACKAGE_CATEGORIES _npkgs
f_show_info "$msg_building_package_main_menu"
# Detect installed packages (updates marks/SELECTED_PACKAGES)
f_package_detect_installed
export PACKAGES_DETECTED=1 # exported for awk(1) ENVIRON[]