diff options
author | dteske <dteske@FreeBSD.org> | 2013-05-09 16:09:39 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-05-09 16:09:39 +0000 |
commit | ce591b770b2ff012762738cb1f1bfeea4003d36c (patch) | |
tree | 64263e857235b5eda1bac53e295cd021e1a2c3f4 /usr.sbin | |
parent | 3fa3fc83d15524488c21b1a7d38fd972c7afb9b9 (diff) | |
download | FreeBSD-src-ce591b770b2ff012762738cb1f1bfeea4003d36c.zip FreeBSD-src-ce591b770b2ff012762738cb1f1bfeea4003d36c.tar.gz |
Fix a bug that would cause the category menu to display the wrong value
for number of packages available in the "All" category. Problem caused by
re-using a variable that was still needed; fixed by variable name change.
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/bsdconfig/share/packages/index.subr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bsdconfig/share/packages/index.subr b/usr.sbin/bsdconfig/share/packages/index.subr index 9aade0c..2d4b60c 100755 --- a/usr.sbin/bsdconfig/share/packages/index.subr +++ b/usr.sbin/bsdconfig/share/packages/index.subr @@ -146,11 +146,11 @@ f_index_read() BEGIN { valid_chars = ENVIRON["VALID_VARNAME_CHARS"] default_desc = ENVIRON["msg_no_description_provided"] - npkgs = 0 + tpkgs = 0 prefix = "" } { - npkgs++ + tpkgs++ varpkg = $1 gsub("[^" valid_chars "]", "_", varpkg) print "_categories_" varpkg "=\"" $7 "\"" @@ -160,7 +160,7 @@ f_index_read() print "_rundeps_" varpkg "=\"" $9 "\"" } END { - print "_npkgs=" npkgs # For convenience, total package count + print "_npkgs=" tpkgs # For convenience, total package count n = asorti(categories, categories_sorted) @@ -175,7 +175,7 @@ f_index_read() # Create menu list and generate list of categories at same time print "CATEGORY_MENU_LIST=\"" - print_category(ENVIRON["msg_all"], npkgs, + print_category(ENVIRON["msg_all"], tpkgs, ENVIRON["msg_all_desc"]) category_list = "" for (i = 1; i <= n; i++) |