svn commit: r250323 - in head/usr.sbin/bsdconfig: . include packages packages/include share share/media share/packages

Devin Teske dteske at FreeBSD.org
Tue May 7 05:40:23 UTC 2013


Author: dteske
Date: Tue May  7 05:40:20 2013
New Revision: 250323
URL: http://svnweb.freebsd.org/changeset/base/250323

Log:
  Commit first portion of package module -- this includes the ability to view
  categories, view packages, mark packages for installation, de-installation,
  or re-installation, calculate and track dependencies, as well as ability to
  review selections.
  
  Still to come is the actual processing of selections (performing the
  various actions associated with the user's selections, such as installing
  dependencies first, then selections, etc.).

Added:
  head/usr.sbin/bsdconfig/packages/
  head/usr.sbin/bsdconfig/packages/INDEX   (contents, props changed)
  head/usr.sbin/bsdconfig/packages/Makefile   (contents, props changed)
  head/usr.sbin/bsdconfig/packages/USAGE   (contents, props changed)
  head/usr.sbin/bsdconfig/packages/include/
  head/usr.sbin/bsdconfig/packages/include/Makefile   (contents, props changed)
  head/usr.sbin/bsdconfig/packages/include/messages.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/packages/packages   (contents, props changed)
  head/usr.sbin/bsdconfig/share/packages/
  head/usr.sbin/bsdconfig/share/packages/Makefile   (contents, props changed)
  head/usr.sbin/bsdconfig/share/packages/categories.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/packages/index.subr   (contents, props changed)
  head/usr.sbin/bsdconfig/share/packages/packages.subr   (contents, props changed)
Modified:
  head/usr.sbin/bsdconfig/Makefile
  head/usr.sbin/bsdconfig/include/messages.subr
  head/usr.sbin/bsdconfig/include/options.hlp
  head/usr.sbin/bsdconfig/share/Makefile
  head/usr.sbin/bsdconfig/share/media/options.subr
  head/usr.sbin/bsdconfig/share/script.subr
  head/usr.sbin/bsdconfig/share/variable.subr

Modified: head/usr.sbin/bsdconfig/Makefile
==============================================================================
--- head/usr.sbin/bsdconfig/Makefile	Tue May  7 04:47:56 2013	(r250322)
+++ head/usr.sbin/bsdconfig/Makefile	Tue May  7 05:40:20 2013	(r250323)
@@ -8,6 +8,7 @@ SUBDIR=	console \
 	include \
 	mouse \
 	networking \
+	packages \
 	password \
 	security \
 	share \

Modified: head/usr.sbin/bsdconfig/include/messages.subr
==============================================================================
--- head/usr.sbin/bsdconfig/include/messages.subr	Tue May  7 04:47:56 2013	(r250322)
+++ head/usr.sbin/bsdconfig/include/messages.subr	Tue May  7 05:40:20 2013	(r250323)
@@ -30,17 +30,34 @@ field_username="Username:"
 hline_alnum_arrows_punc_tab_enter="Use alnum, arrows, punctuation, TAB or ENTER"
 hline_alnum_punc_tab_enter="Use alpha-numeric, punctuation, TAB or ENTER"
 hline_arrows_tab_enter="Press arrows, TAB or ENTER"
+hline_arrows_tab_punc_enter="Use arrows, TAB, punctuation, ENTER"
 hline_choose_help_for_more_information_on_media_types="Choose Help for more information on the various media types"
 msg_accept_continue="Accept/Continue"
+msg_accessibility_desc="Ports to help disabled users."
+msg_afterstep_desc="Ports to support the AfterStep window manager."
+msg_all="All"
+msg_all_available_packages_in_all_categories="All available packages in all categories."
+msg_all_desc="All available packages in all categories."
 msg_always_try_sudo_when_run_as="Always try sudo(8) when run as %s"
+msg_arabic_desc="Ported software for Arab countries."
+msg_archivers_desc="Utilities for archiving and unarchiving data."
 msg_argentina="Argentina"
 msg_assume_network_is_already_configured="Running multi-user, assume that the network is already configured?"
+msg_assume_yes_to_all_non_critical_dialogs="Assume \"Yes\" answers to all non-critical dialogs"
+msg_astro_desc="Applications related to astronomy."
 msg_attempt_automatic_dhcp_configuration="Attempt automatic DHCP configuration of interfaces"
 msg_attempt_ipv6_configuration_of_interfaces="Attempt IPv6 configuration of interfaces"
+msg_attempting_to_fetch_file_from_selected_media="Attempting to fetch %s file from selected media."
+msg_audio_desc="Audio utilities - most require a supported sound card."
 msg_australia="Australia"
 msg_austria="Austria"
+msg_back="Back"
 msg_becoming_root_via_sudo="Becoming root via sudo(8)..."
+msg_benchmarks_desc="Utilities for measuring system performance."
+msg_biology_desc="Software related to biology."
 msg_brazil="Brazil"
+msg_building_package_menus="Building package menu(s)..."
+msg_cad_desc="Computer Aided Design utilities."
 msg_canada="Canada"
 msg_cancel="Cancel"
 msg_cancel_exit="Cancel/Exit"
@@ -52,6 +69,7 @@ msg_cd_dvd="CD/DVD"
 msg_cdrom="CDROM"
 msg_checking_access_to="Checking access to\n %s"
 msg_china="China"
+msg_chinese_desc="Ported software for the Chinese market."
 msg_choose_a_cd_dvd_type="Choose a CD/DVD type"
 msg_choose_a_dos_partition="Choose a DOS partition"
 msg_choose_a_floppy_drive="Choose a Floppy drive"
@@ -61,7 +79,9 @@ msg_choose_installation_media="Choose In
 msg_choose_installation_media_description="FreeBSD can be installed from a variety of different installation\nmedia, ranging from floppies to an Internet FTP server.  If you're\ninstalling FreeBSD from a supported CD/DVD drive then this is generally\nthe best media to use if you have no overriding reason for using other\nmedia."
 msg_client_error="Client error, you could try an other server"
 msg_command_failed_rest_of_script_aborted="Command \`%s' failed - rest of script aborted."
+msg_comms_desc="Communications utilities."
 msg_configuration_for_interface="Configuration for Interface"
+msg_converters_desc="Format conversion utilities."
 msg_could_not_unmount_the_cdrom_dvd="Could not unmount the CDROM/DVD from %s: %s"
 msg_could_not_unmount_the_dos_partition="Could not unmount the DOS partition from %s: %s"
 msg_could_not_unmount_the_nfs_partition="Could not unmount the NFS partition from %s: %s"
@@ -72,17 +92,27 @@ msg_couldnt_open_ftp_connection="Couldn'
 msg_created_path="Created %s"
 msg_croatia="Croatia"
 msg_czech_republic="Czech Republic"
+msg_databases_desc="Database software."
 msg_debugging="Debugging"
 msg_denmark="Denmark"
+msg_deskutils_desc="Various Desktop utilities."
+msg_devel_desc="Software development utilities and libraries."
 msg_device_is_not_configured="The %s device is not configured.  You will need to do so\nin the Networking configuration menu before proceeding."
 msg_dhcp="DHCP"
 msg_dialog_mixedform_navigation_help="Use <up>/<down> arrows to navigate between fields, TAB to focus buttons, and Enter for OK/Cancel."
 msg_directory="Directory"
 msg_directory_not_found="%s: Directory not found."
+msg_directory_where_package_temporary_files_go="The directory where package temporary files should go"
+msg_dns_desc="Domain Name Service tools."
+msg_docs_desc="Meta-ports for FreeBSD documentation."
 msg_done="Done"
 msg_dos="DOS"
 msg_editor="Editor"
+msg_editors_desc="Editors."
+msg_elisp_desc="Things related to Emacs Lisp."
 msg_emit_extra_debugging_output="Emit extra debugging output"
+msg_emulators_desc="Utilities for emulating other operating systems."
+msg_enlightenment_desc="Software for the Enlightenment Desktop Environment."
 msg_enter_a_fully_qualified_pathname_for_the_directory="Enter a fully qualified pathname for the directory\ncontaining the FreeBSD distribution files:"
 msg_enter_the_device_name_of_a_ufs_formatted_partition="Enter the device-name of a UFS formatted partition"
 msg_error="Error"
@@ -96,19 +126,32 @@ msg_exit_bsdconfig="Exit bsdconfig"
 msg_extra_options_to_ifconfig="Extra options to ifconfig (usually empty):"
 msg_failed_to_add_default_route="Failed to add a default route; please check your network configuration"
 msg_file_system="File System"
+msg_finance_desc="Monetary, financial and related applications."
 msg_finland="Finland"
 msg_floppy="Floppy"
 msg_france="France"
+msg_french_desc="Ported software for French countries."
 msg_ftp="FTP"
+msg_ftp_desc="FTP client and server utilities."
 msg_ftp_passive="FTP Passive"
 msg_ftp_username="FTP username"
+msg_games_desc="Various games and sundry amusements."
+msg_geography_desc="Geography-related software."
+msg_german_desc="Ported software for Germanic countries."
 msg_germany="Germany"
+msg_gnome_desc="Components of the Gnome Desktop environment."
+msg_gnustep_desc="Software for GNUstep desktop environment."
+msg_graphics_desc="Graphics libraries and utilities."
 msg_greece="Greece"
+msg_hamradio_desc="Software for amateur radio."
+msg_haskell_desc="Software related to the Haskell language."
+msg_hebrew_desc="Ported software for Hebrew language."
 msg_help="Help"
 msg_host_name_including_domain="Host name (including domain)"
 msg_hostname_variable_not_set="WARNING: hostname variable not set and is a non-optional\nparameter.  Please add this to your installation script\nor set the netInteractive variable (see bsdconfig man page)"
 msg_http="HTTP"
 msg_http_proxy="HTTP Proxy"
+msg_hungarian_desc="Ported software for the Hungarian market."
 msg_hungary="Hungary"
 msg_iceland="Iceland"
 msg_install_from_a_dos_partition="Install from a DOS partition"
@@ -121,39 +164,64 @@ msg_install_from_an_ftp_server_thru_fire
 msg_install_from_an_ftp_server_thru_proxy="Install from an FTP server through an HTTP proxy"
 msg_install_from_the_existing_filesystem="Install from the existing filesystem"
 msg_install_over_nfs="Install over NFS"
+msg_installed="Installed"
+msg_installed_desc="Leave package as-is, installed"
 msg_invalid_gateway_ipv4_address_specified="Invalid gateway IPv4 address specified"
 msg_invalid_hostname_value="Invalid hostname value"
 msg_invalid_ipv4_address="Invalid IPv4 address"
 msg_invalid_name_server_ip_address_specified="Invalid name server IP address specified"
 msg_invalid_netmask_value="Invalid netmask value"
 msg_invalid_nfs_path_specification="Invalid NFS path specification.  Must be of the form:\nhost:/full/pathname/to/FreeBSD/distdir"
+msg_io_or_format_error_on_index_file="I/O or format error on %s file.\nPlease verify media (or path to media) and try again."
 msg_ipv4_address="IPv4 Address"
 msg_ipv4_gateway="IPv4 Gateway"
 msg_ipv6="IPv6"
+msg_ipv6_desc="IPv6-related software."
 msg_ipv6_ready="IPv6 ready"
+msg_irc_desc="Internet Relay Chat utilities."
 msg_ireland="Ireland"
 msg_israel="Israel"
 msg_italy="Italy"
 msg_japan="Japan"
+msg_japanese_desc="Ported software for the Japanese market."
+msg_java_desc="Java language support."
+msg_kde_desc="Software for the K Desktop Environment."
+msg_kld_desc="Kernel loadable modules."
 msg_korea="Korea"
+msg_korean_desc="Ported software for the Korean market."
+msg_lang_desc="Computer languages."
 msg_length_of_specified_url_is_too_long="Length of specified URL is %u characters. Allowable maximum is %u."
+msg_linux_desc="Linux programs that can run under binary compatibility."
+msg_lisp_desc="Software related to the Lisp language."
 msg_lithuania="Lithuania"
+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_up_host="Looking up host %s"
+msg_mail_desc="Electronic mail packages and utilities."
 msg_main_menu="Main Menu"
 msg_main_site="Main Site"
+msg_math_desc="Mathematical computation software."
+msg_mbone_desc="Applications and utilities for the MBONE."
 msg_media_timeout="Media Timeout"
 msg_media_type="Media Type"
 msg_menu_text="If you've already installed FreeBSD, you may use\nthis menu to customize it somewhat to suit your\nparticular configuration.  Most importantly, you\ncan use the Packages utility to load extra '3rd\nparty' software not provided in the base\ndistributions."
+msg_misc_desc="Miscellaneous utilities."
 msg_missing_ftp_host_or_directory="Missing FTP host or directory specification.  FTP media not initialized."
+msg_multimedia_desc="Multimedia software."
 msg_must_be_root_to_execute="%s: must be root to execute"
 msg_must_specify_a_host_name_of_some_sort="Must specify a host name of some sort!"
 msg_name_server="Name server"
+msg_net_desc="Networking utilities."
 msg_net_device_init_failed="Net device init failed."
+msg_net_im_desc="Instant messaging software."
+msg_net_mgmt_desc="Network management tools."
+msg_net_p2p_desc="Peer to peer network applications."
 msg_netherlands="Netherlands"
 msg_netmask="Netmask"
 msg_network_configuration="Network Configuration"
 msg_network_interface_information_required="Network interface information required"
+msg_news_desc="USENET News support software."
+msg_next_page="Next page"
 msg_nfailed_attempts="%u incorrect password attempts"
 msg_nfs="NFS"
 msg_nfs_secure="NFS Secure"
@@ -163,10 +231,12 @@ msg_nfs_tcp="NFS TCP"
 msg_nfs_version_3="NFS version 3"
 msg_no="No"
 msg_no_cd_dvd_devices_found="No CD/DVD devices found!  Please check that your system's\nconfiguration is correct and that the CD/DVD drive is of a\nsupported type. For more information, consult the hardware\nguide in the Doc menu."
+msg_no_description_provided="No description provided"
 msg_no_dos_primary_partitions_found="No DOS primary partitions found!  This installation method is unavailable"
 msg_no_floppy_devices_found="No floppy devices found!  Please check that your system's configuration\nis correct.  For more information, consult the hardware guide in the Doc\nmenu."
 msg_no_gateway_has_been_set="No gateway has been set. You will be unable to access hosts\nnot on your local network"
 msg_no_network_devices="No network devices available!"
+msg_no_packages_were_selected_for_extraction="No packages were selected for extraction."
 msg_no_such_file_or_directory="%s: %s: No such file or directory"
 msg_no_usb_devices_found="No USB devices found (try Options/Re-scan Devices)"
 msg_no_username="No username provided!"
@@ -178,7 +248,14 @@ msg_ok="OK"
 msg_options="Options"
 msg_options_editor="Options Editor"
 msg_other="other"
+msg_package_temp="Package Temp"
+msg_page_of_npages="(Page %s of %s)"
+msg_palm_desc="Software support for the Palm(tm) series."
+msg_parallel_desc="Applications dealing with parallelism in computing."
+msg_pear_desc="Software related to the Pear PHP framework."
+msg_perl5_desc="Utilities/modules for the PERL5 language."
 msg_permission_denied="%s: %s: Permission denied"
+msg_plan9_desc="Software from the Plan9 operating system."
 msg_please_check_the_url_and_try_again="No such directory: %s\nplease check the URL and try again."
 msg_please_enter_password="Please enter your password for sudo(8):"
 msg_please_enter_the_address_of_the_http_proxy="Please enter the address of the HTTP proxy in this format:\n hostname:port (the ':port' is optional, default is 3128)"
@@ -188,6 +265,7 @@ msg_please_enter_the_username_you_wish_t
 msg_please_enter_username_password="Please enter a username and password for sudo(8):"
 msg_please_insert_floppy_containing="Please insert floppy containing %s in %s"
 msg_please_insert_floppy_in_drive="Please insert floppy in %s"
+msg_please_select_a_category_to_display="Please select a category to display."
 msg_please_select_a_cd_dvd_drive="FreeBSD can be installed directly from a CD/DVD containing a valid\nFreeBSD distribution.  If you are seeing this menu it is because\nmore than one CD/DVD drive was found on your system.  Please select\none of the following CD/DVD drives as your installation drive."
 msg_please_select_a_floppy_drive="You have more than one floppy drive.  Please choose which drive\nyou would like to use."
 msg_please_select_a_freebsd_ftp_distribution_site="Please select a FreeBSD FTP distribution site"
@@ -196,30 +274,53 @@ msg_please_select_dos_partition="FreeBSD
 msg_please_select_ethernet_device_to_configure="Please select the ethernet or PLIP device to configure."
 msg_please_select_the_site_closest_to_you_or_other="Please select the site closest to you or \"other\" if you'd like to\nspecify a different choice.  Also note that not every site listed here\ncarries more than the base distribution kits. Only Primary sites are\nguaranteed to carry the full range of possible distributions."
 msg_please_select_ufs_partition="FreeBSD can be installed directly from another FreeBSD partition\nthat is UFS formatted assuming, of course, that you have copied\nthe relevant distributions into said partition before starting\ninstallation."
+msg_please_specify_a_temporary_directory="Please specify a temporary directory with lots of free space:"
 msg_please_specify_the_name_of_the_text_editor="Please specify the name of the text editor you wish to use:"
 msg_please_specify_the_number_of_seconds_to_wait="Please specify the number of seconds to wait for slow media:"
 msg_please_specify_the_release_you_wish_to_load="Please specify the release you wish to load or\n\"any\" for a generic release install:"
 msg_please_specify_url_of_a_freebsd_distribution="Please specify the URL of a FreeBSD distribution on a\nremote ftp site.  This site must accept either anonymous\nftp or you should have set an ftp username and password\nin the Options screen.\n\nA URL looks like this:  ftp://<hostname>/<path>\nWhere <path> is relative to the anonymous ftp directory or the\nhome directory of the user being logged in as."
 msg_poland="Poland"
+msg_polish_desc="Ported software for the Polish market."
+msg_ports_mgmt_desc="Utilities for managing ports and packages."
 msg_portugal="Portugal"
+msg_portuguese_desc="Ported software for the Portuguese market."
+msg_previous_page="Previous page"
 msg_previous_syntax_errors="%s: Not overwriting \`%s' due to previous syntax errors"
 msg_primary="Primary"
+msg_print_desc="Utilities for dealing with printing."
 msg_probing_devices_please_wait_this_can_take_a_while="Probing devices, please wait (this can take a while)..."
+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_reinstall="Reinstall"
+msg_reinstall_desc="Mark this package for reinstall"
 msg_release_name="Release Name"
 msg_rerun_bsdconfig_initial_device_probe="Re-run bsdconfig initial device probe"
 msg_rescan_devices="Re-scan Devices"
 msg_reset="RESET!"
 msg_reset_all_values_to_startup_defaults="Reset all values to startup defaults"
 msg_reuse_old_ftp_site_selection_values="Re-use old FTP site selection values?"
+msg_review="Review"
+msg_review_desc="Review/perform pending actions"
+msg_review_help="Install, Re-Install, or Un-install selected packages and dependencies"
+msg_reviewing_selected_packages="Reviewing %u selected packages:"
 msg_romania="Romania"
+msg_ruby_desc="Software related to the Ruby language."
+msg_rubygems_desc="Ports of RubyGems packages."
 msg_russia="Russia"
+msg_russian_desc="Ported software for the Russian market."
 msg_scanning_for_dhcp_servers="Scanning for DHCP servers..."
 msg_scanning_for_ra_servers="Scanning for RA servers..."
+msg_scheme_desc="Software related to the Scheme language."
+msg_science_desc="Scientific software."
 msg_secure_mode_requires_root="Secure-mode requires root-access!"
 msg_secure_mode_requires_x11="Secure-mode requires X11 (use \`-X')!"
+msg_security_desc="System security software."
+msg_select="Select"
 msg_select_a_site_thats_close="Select a site that's close!"
 msg_server_error_when_requesting_url="Server error when requesting %s, you could try an other server"
+msg_shells_desc="Various shells (tcsh, bash, etc)."
 msg_singapore="Singapore"
 msg_slovak_republic="Slovak Republic"
 msg_slovenia="Slovenia"
@@ -229,12 +330,17 @@ msg_sorry_invalid_url="Sorry, %s is an i
 msg_sorry_try_again="Sorry, try again."
 msg_south_africa="South Africa"
 msg_spain="Spain"
+msg_spanish_desc="Ported software for the Spanish market."
 msg_specify_some_other_ftp_site="Specify some other ftp site by URL"
 msg_sweden="Sweden"
 msg_switzerland="Switzerland"
+msg_sysutils_desc="Various system utilities."
 msg_taiwan="Taiwan"
+msg_tcl_desc="TCL and packages that depend on it."
+msg_textproc_desc="Text processing/search utilities."
 msg_the_current_installation_media_type="The current installation media type."
 msg_timeout_value_in_seconds_for_slow_media="Timeout value in seconds for slow media."
+msg_tk_desc="Tk and packages that depend on it."
 msg_try_dhcp_configuration="Do you want to try DHCP configuration of the interface?"
 msg_try_ipv6_configuration="Do you want to try IPv6 configuration of the interface?"
 msg_try_sudo_only_this_once="Try sudo(8) only this once"
@@ -242,10 +348,14 @@ msg_turkey="Turkey"
 msg_ufs="UFS"
 msg_uk="UK"
 msg_ukraine="Ukraine"
+msg_ukrainian_desc="Ported software for the Ukrainian market."
 msg_unable_to_configure_device="Unable to configure the %s interface!\nThis installation method cannot be used."
+msg_unable_to_get_file_from_selected_media="Unable to get %s file from selected media.\n\nThis may be because the packages collection is not available\non the distribution media you've chosen, most likely an FTP site\nwithout the packages collection mirrored.  Please verify that\nyour media, or your path to the media, is correct and try again."
 msg_unable_to_get_proper_ftp_path="Unable to get proper FTP path.  FTP media not initialized."
 msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!"
 msg_unable_to_open="Unable to open %s"
+msg_uninstall="Uninstall"
+msg_uninstall_desc="Mark this package for deletion"
 msg_unknown="unknown"
 msg_unknown_user="Unknown user: %s"
 msg_url_was_not_found="%s was not found, maybe directory or release-version are wrong?"
@@ -260,14 +370,30 @@ msg_user_is_using_a_slow_pc_or_ethernet_
 msg_username_and_password_to_use="Username and password to use instead of anonymous"
 msg_using_interface="Using interface %s"
 msg_using_usb_device="Using USB device: %s"
+msg_vietnamese_desc="Ported software for the Vietnamese market."
 msg_view_set_various_media_options="View/Set various media options"
+msg_what_would_you_like_to_do_with="What would you like to do with %s?"
 msg_which_release_to_attempt_to_load="Which release to attempt to load from installation media"
 msg_which_text_editor_to_use="Which text editor to use during installation"
+msg_windowmaker_desc="Ports to support the WindowMaker window manager."
 msg_would_you_like_to_bring_interface_up="Would you like to bring the %s interface up right now?"
+msg_www_desc="Web utilities (browsers, HTTP servers, etc)."
+msg_x11_clocks_desc="X Window System based clocks."
+msg_x11_desc="X Window System based utilities."
+msg_x11_drivers_desc="X Window System drivers."
+msg_x11_fm_desc="X Window System based file managers."
+msg_x11_fonts_desc="X Window System fonts and font utilties."
+msg_x11_servers_desc="X Window System servers."
+msg_x11_themes_desc="X Window System themes."
+msg_x11_toolkits_desc="X Window System based development toolkits."
+msg_x11_wm_desc="X Window System window managers."
+msg_xfce_desc="Software related to the Xfce Desktop Environment."
 msg_yes="Yes"
+msg_yes_to_all="Yes to All"
 msg_you_are_not_root_but="You are not root but %s can use sudo(8).\nWhat would you like to do?"
 msg_you_may_remove_the_floppy="You may remove the floppy from %s"
 msg_youve_already_done_the_network_configuration="You've already done the network configuration once,\nwould you like to skip over it now?"
+msg_zope_desc="Software related to the Zope platform."
 tcplayout_extras_help="Any interface-specific options to ifconfig you would like to add"
 tcplayout_extras_help_for_plip="For PLIP configuration, you must enter the peer's IP address here."
 tcplayout_gateway_help="IPv4 address of host forwarding packets to non-local destinations"

Modified: head/usr.sbin/bsdconfig/include/options.hlp
==============================================================================
--- head/usr.sbin/bsdconfig/include/options.hlp	Tue May  7 04:47:56 2013	(r250322)
+++ head/usr.sbin/bsdconfig/include/options.hlp	Tue May  7 05:40:20 2013	(r250323)
@@ -40,6 +40,15 @@ Debugging:    Turn on the extra debuggin
     to the developers in tracking such problems down!
 
 
+Yes To All:   Assume "Yes" answers to all non-critical dialogs
+
+    This flag should be used with caution.  It will essentially
+    decide NOT to ask the user about any "boundary" conditions that
+    might not constitute actual errors but may be warnings indicative
+    of other problems.  It's most useful to those who are doing unattended
+    installs.
+
+
 DHCP:         Enable DHCP configuration of interfaces
 
     This option specifies whether DHCP configuration of interfaces
@@ -88,6 +97,14 @@ Media Type:   Which media type is being 
     to the media menu itself.
 
 
+Package Temp:  Where package temporary files should go
+
+   Some packages, like emacs, can use a LOT of temporary space - up to
+   20 or 30MB.  If you are going to configure a small / directory and no
+   separate /var (and hence a small /var/tmp), then you may wish to set
+   this to point at another location (say, /usr/tmp).
+
+
 Re-scan Devices:  
 
    Reprobe the system for devices.

Added: head/usr.sbin/bsdconfig/packages/INDEX
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/packages/INDEX	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,52 @@
+# Copyright (c) 2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+#
+# Title that will be shown on the bsdconfig menu
+menu_title="Packages"
+#
+# a short descriptive line shown at the bottom of the bsdconfig menu.
+# keep it short because any line longer than the terminal width will
+#   be truncated.
+menu_help="Install pre-packaged software for FreeBSD"
+#
+# two-part variable that defines an action to take when 'keyword'
+#   is passed on a bsdconfig command line. variable takes the form
+#   "keyword|command" and multiple occurrences of the variable
+#   (with different 'keyword's, or different 'keyword's AND 'command's)
+#   are allowed.  If 'command' begins with a '/' then the full
+#   path to the program is needed. If 'command' begins with anything
+#   else it is a path relative to the directory this INDEX file is in.
+#   'keyword' can be i18n'ed but 'command' is the name of a script.
+menu_selection="packages|packages"
+#
+# Items below this line do NOT need i18n translation----------------------
+#
+# Name of the program to be run when this menu choice is selected.
+#   if it begins with a '/' then the full path to the program is needed.
+#   if it begins with anything else it is a path relative to the directory
+#     this INDEX file is in.
+menu_program="packages"

Added: head/usr.sbin/bsdconfig/packages/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/packages/Makefile	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+NO_OBJ=
+
+SUBDIR= include
+
+FILESDIR=	${LIBEXECDIR}/bsdconfig/030.packages
+FILES=		INDEX USAGE
+
+SCRIPTSDIR=	${FILESDIR}
+SCRIPTS=	packages
+
+beforeinstall:
+	mkdir -p ${DESTDIR}${FILESDIR}
+
+.include <bsd.prog.mk>

Added: head/usr.sbin/bsdconfig/packages/USAGE
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/packages/USAGE	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,37 @@
+# Copyright (c) 2013 Devin Teske
+# All Rights Reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
+
+OPTIONS:
+	-d         Provide lots of debugging info on standard-out when running.
+	-D file    Send debugging info to file. If file begins with a plus-sign
+	           debug info is sent to both standard-out and file (minus the
+	           leading plus).
+	-h         Print this usage statement and exit.
+	-S         Secure X11 mode (implies `-X'). As root, always prompt-for
+	           and validate sudo(8) username/password before starting.
+	-X         Use Xdialog(1) in place of dialog(1).

Added: head/usr.sbin/bsdconfig/packages/include/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/packages/include/Makefile	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+NO_OBJ=
+
+FILESDIR=	${LIBEXECDIR}/bsdconfig/030.packages/include
+FILES=		messages.subr
+
+beforeinstall:
+	mkdir -p ${DESTDIR}${FILESDIR}
+
+.include <bsd.prog.mk>

Added: head/usr.sbin/bsdconfig/packages/include/messages.subr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/packages/include/messages.subr	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,27 @@
+# Copyright (c) 2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+msg_package_selection="Package Selection"

Added: head/usr.sbin/bsdconfig/packages/packages
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/packages/packages	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,76 @@
+#!/bin/sh
+#-
+# Copyright (c) 2013 Devin Teske
+# All Rights Reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+############################################################ INCLUDES
+
+# Prevent device.subr (included indirectly via media/*.subr below) from auto
+# scanning; we'll perform this manually using f_device_get_all() during init
+# but only after we've successfully completed f_mustberoot_init().
+#
+DEVICE_SELF_SCAN_ALL=NO
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
+f_include $BSDCFG_SHARE/mustberoot.subr
+f_include $BSDCFG_SHARE/packages/packages.subr
+
+BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="030.packages"
+f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
+
+ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
+[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+
+############################################################ MAIN
+
+# Incorporate rc-file if it exists
+[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
+
+#
+# Process command-line arguments
+#
+while getopts dD:hSX flag; do
+	case "$flag" in
+	h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
+	esac
+done
+shift $(( $OPTIND - 1 ))
+
+#
+# Initialize
+#
+f_dialog_title "$msg_package_selection"
+f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
+f_mustberoot_init
+f_device_get_all
+
+#
+# Display the package configuration menu and exit
+#
+f_package_config

Modified: head/usr.sbin/bsdconfig/share/Makefile
==============================================================================
--- head/usr.sbin/bsdconfig/share/Makefile	Tue May  7 04:47:56 2013	(r250322)
+++ head/usr.sbin/bsdconfig/share/Makefile	Tue May  7 05:40:20 2013	(r250323)
@@ -2,7 +2,7 @@
 
 NO_OBJ=
 
-SUBDIR=	media
+SUBDIR=	media packages
 
 FILESDIR=	${SHAREDIR}/bsdconfig
 FILES=		common.subr device.subr dialog.subr mustberoot.subr \

Modified: head/usr.sbin/bsdconfig/share/media/options.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/media/options.subr	Tue May  7 04:47:56 2013	(r250322)
+++ head/usr.sbin/bsdconfig/share/media/options.subr	Tue May  7 05:40:20 2013	(r250323)
@@ -111,6 +111,15 @@ f_media_options_menu()
 			    '$msg_emit_extra_debugging_output'"
 		fi
 
+		f_getvar $VAR_NO_CONFIRM cp
+		if [ "$cp" ]; then menu_list="$menu_list
+			' $msg_yes_to_all' 'YES'
+			    '$msg_assume_yes_to_all_non_critical_dialogs'"
+		else menu_list="$menu_list
+			' $msg_yes_to_all' 'NO'
+			    '$msg_assume_yes_to_all_non_critical_dialogs'"
+		fi
+
 		f_getvar $VAR_TRY_DHCP cp
 		if [ "$cp" = "YES" ]; then menu_list="$menu_list
 			' $msg_dhcp' 'YES'
@@ -179,6 +188,11 @@ f_media_options_menu()
 			' $msg_media_timeout' '$cp'
 			    '$msg_timeout_value_in_seconds_for_slow_media'"
 
+		f_getvar $VAR_PKG_TMPDIR cp
+		menu_list="$menu_list
+			' $msg_package_temp' '$cp'
+			    '$msg_directory_where_package_temporary_files_go'"
+
 		menu_list="$menu_list
 			' $msg_rescan_devices' '<*>'
 			    '$msg_rerun_bsdconfig_initial_device_probe'
@@ -260,6 +274,12 @@ f_media_options_menu()
 			else
 				export $VAR_DEBUG=1
 			fi ;;
+		" $msg_yes_to_all")
+			if f_getvar $VAR_NO_CONFIRM cp && [ "$cp" ]; then
+				unset $VAR_NO_CONFIRM
+			else
+				export $VAR_NO_CONFIRM=1
+			fi ;;
 		" $msg_dhcp")
 			f_getvar $VAR_TRY_DHCP cp
 			if [ "$cp" = "YES" ]; then
@@ -290,6 +310,10 @@ f_media_options_menu()
 			f_variable_get_value $VAR_MEDIA_TIMEOUT \
 			    "$msg_please_specify_the_number_of_seconds_to_wait"
 			;;
+		" $msg_package_temp")
+			f_variable_get_value $VAR_PKG_TMPDIR \
+			    "$msg_please_specify_a_temporary_directory"
+			;;
 		" $msg_rescan_devices")
 			f_device_rescan ;;
 		" $msg_use_defaults")

Added: head/usr.sbin/bsdconfig/share/packages/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/share/packages/Makefile	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+NO_OBJ=
+
+FILESDIR=	${SHAREDIR}/bsdconfig/packages
+FILES=		categories.subr index.subr packages.subr
+
+beforeinstall:
+	mkdir -p ${DESTDIR}${FILESDIR}
+
+.include <bsd.prog.mk>

Added: head/usr.sbin/bsdconfig/share/packages/categories.subr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/share/packages/categories.subr	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,203 @@
+if [ ! "$_PACKAGES_CATEGORIES_SUBR" ]; then _PACKAGES_CATEGORIES_SUBR=1
+#
+# Copyright (c) 2013 Devin Teske
+# All Rights Reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." packages/categories.subr
+f_include $BSDCFG_SHARE/strings.subr
+
+BSDCFG_LIBE="/usr/libexec/bsdconfig"
+f_include_lang $BSDCFG_LIBE/include/messages.subr
+
+############################################################ GLOBALS
+
+CATEGORIES=
+
+############################################################ FUNCTIONS
+
+# f_category_desc_get $category [$var_to_set]
+#
+# Fetch the description of a given category. Returns success if a match was
+# found, otherwise failure.
+#
+# If $var_to_set is missing or NULL, the category description is printed to
+# standard out for capturing in a sub-shell (which is less-recommended because
+# of performance degredation; for example, when called in a loop).
+#
+f_category_desc_get()
+{
+	local __category="$1" __var_to_set="$2" __cat __varcat
+
+	# Return failure if $category
+	[ "$__category" ] || return $FAILURE
+
+	for __cat in $CATEGORIES; do
+		[ "$__cat" = "$__category" ] || continue
+		f_str2varname $__cat __varcat
+		f_getvar _category_$__varcat $__var_to_set
+		return $?
+	done
+	return $FAILURE
+}
+
+# f_category_desc_set $category $desc
+#
+# Store a description in-association with a category. $category should be
+# alphanumeric and can include the underscore [_] but should not contain
+# whitespace. Returns success unless $category is NULL or no arguments. Use the
+# f_category_desc_get() routine with the same $category to retrieve the stored
+# description.
+#
+f_category_desc_set()
+{
+	local category="$1" desc="$2"
+	local cat varcat found=
+	[ "$category" ] || return $FAILURE
+	for cat in $CATEGORIES; do
+		[ "$cat" = "$category" ] || continue
+		f_str2varname $cat varcat
+		f_quietly f_getvar _category_$varcat || continue
+		found=1 && break
+	done
+	if [ ! "$found" ]; then
+		CATEGORIES="$CATEGORIES $category"
+	fi
+	f_str2varname $category varcat
+	setvar "_category_$varcat" "$desc"
+	# Export the variable for awk(1) ENVIRON visibility
+	export "_category_$varcat"
+	return $SUCCESS
+}
+
+############################################################ MAIN
+
+#
+# Load descriptions for package categories
+#
+f_category() { f_category_desc_set "$1" "$2"; }
+f_category All           "$msg_all_available_packages_in_all_categories"
+f_category accessibility "$msg_accessibility_desc"
+f_category afterstep     "$msg_afterstep_desc"
+f_category arabic        "$msg_arabic_desc"
+f_category archivers     "$msg_archivers_desc"
+f_category astro         "$msg_astro_desc"
+f_category audio         "$msg_audio_desc"
+f_category benchmarks    "$msg_benchmarks_desc"
+f_category biology       "$msg_biology_desc"
+f_category cad           "$msg_cad_desc"
+f_category chinese       "$msg_chinese_desc"
+f_category comms         "$msg_comms_desc"
+f_category converters    "$msg_converters_desc"
+f_category databases     "$msg_databases_desc"
+f_category deskutils     "$msg_deskutils_desc"
+f_category devel         "$msg_devel_desc"
+f_category dns           "$msg_dns_desc"
+f_category docs          "$msg_docs_desc"
+f_category editors       "$msg_editors_desc"
+f_category elisp         "$msg_elisp_desc"
+f_category emulators     "$msg_emulators_desc"
+f_category enlightenment "$msg_enlightenment_desc"
+f_category finance       "$msg_finance_desc"
+f_category french        "$msg_french_desc"
+f_category ftp           "$msg_ftp_desc"
+f_category games         "$msg_games_desc"
+f_category geography     "$msg_geography_desc"
+f_category german        "$msg_german_desc"
+f_category gnome         "$msg_gnome_desc"
+f_category gnustep       "$msg_gnustep_desc"
+f_category graphics      "$msg_graphics_desc"
+f_category hamradio      "$msg_hamradio_desc"
+f_category haskell       "$msg_haskell_desc"
+f_category hebrew        "$msg_hebrew_desc"
+f_category hungarian     "$msg_hungarian_desc"
+f_category ipv6          "$msg_ipv6_desc"
+f_category irc           "$msg_irc_desc"
+f_category japanese      "$msg_japanese_desc"
+f_category java          "$msg_java_desc"
+f_category kde           "$msg_kde_desc"
+f_category kld           "$msg_kld_desc"
+f_category korean        "$msg_korean_desc"
+f_category lang          "$msg_lang_desc"
+f_category linux         "$msg_linux_desc"
+f_category lisp          "$msg_lisp_desc"
+f_category mail          "$msg_mail_desc"
+f_category math          "$msg_math_desc"
+f_category mbone         "$msg_mbone_desc"
+f_category misc          "$msg_misc_desc"
+f_category multimedia    "$msg_multimedia_desc"
+f_category net           "$msg_net_desc"
+f_category net-im        "$msg_net_im_desc"
+f_category net-mgmt      "$msg_net_mgmt_desc"
+f_category net-p2p       "$msg_net_p2p_desc"
+f_category news          "$msg_news_desc"
+f_category palm          "$msg_palm_desc"
+f_category parallel      "$msg_parallel_desc"
+f_category pear          "$msg_pear_desc"
+f_category perl5         "$msg_perl5_desc"
+f_category plan9         "$msg_plan9_desc"
+f_category polish        "$msg_polish_desc"
+f_category ports-mgmt    "$msg_ports_mgmt_desc"
+f_category portuguese    "$msg_portuguese_desc"
+f_category print         "$msg_print_desc"
+f_category python        "$msg_python_desc"
+f_category ruby          "$msg_ruby_desc"
+f_category rubygems      "$msg_rubygems_desc"
+f_category russian       "$msg_russian_desc"
+f_category scheme        "$msg_scheme_desc"
+f_category science       "$msg_science_desc"
+f_category security      "$msg_security_desc"
+f_category shells        "$msg_shells_desc"
+f_category spanish       "$msg_spanish_desc"
+f_category sysutils      "$msg_sysutils_desc"
+f_category tcl           "$msg_tcl_desc"
+f_category textproc      "$msg_textproc_desc"
+f_category tk            "$msg_tk_desc"
+f_category ukrainian     "$msg_ukrainian_desc"
+f_category vietnamese    "$msg_vietnamese_desc"
+f_category windowmaker   "$msg_windowmaker_desc"
+f_category www           "$msg_www_desc"
+f_category x11           "$msg_x11_desc"
+f_category x11-clocks    "$msg_x11_clocks_desc"
+f_category x11-drivers   "$msg_x11_drivers_desc"
+f_category x11-fm        "$msg_x11_fm_desc"
+f_category x11-fonts     "$msg_x11_fonts_desc"
+f_category x11-servers   "$msg_x11_servers_desc"
+f_category x11-themes    "$msg_x11_themes_desc"
+f_category x11-toolkits  "$msg_x11_toolkits_desc"
+f_category x11-wm        "$msg_x11_wm_desc"
+f_category xfce          "$msg_xfce_desc"
+f_category zope          "$msg_zope_desc"
+
+f_dprintf "%s: Initialized %u package category descriptions." \
+          packages/categories.subr "$( set -- $CATEGORIES; echo $# )"
+
+f_dprintf "%s: Successfully loaded." packages/categories.subr
+
+fi # ! $_PACKAGES_CATEGORIES_SUBR

Added: head/usr.sbin/bsdconfig/share/packages/index.subr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bsdconfig/share/packages/index.subr	Tue May  7 05:40:20 2013	(r250323)
@@ -0,0 +1,244 @@
+if [ ! "$_PACKAGES_INDEX_SUBR" ]; then _PACKAGES_INDEX_SUBR=1
+#
+# Copyright (c) 2013 Devin Teske
+# All Rights Reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." packages/index.subr
+f_include $BSDCFG_SHARE/device.subr
+f_include $BSDCFG_SHARE/media/common.subr
+f_include $BSDCFG_SHARE/strings.subr
+
+BSDCFG_LIBE="/usr/libexec/bsdconfig"
+f_include_lang $BSDCFG_LIBE/include/messages.subr
+
+############################################################ GLOBALS
+
+PACKAGE_INDEX=
+_INDEX_INITTED=
+
+############################################################ FUNCTIONS
+
+# f_index_initialize $path [$var_to_set]
+#
+# Read and initialize the global index. $path is to be relative to the chosen
+# media (not necessarily the filesystem; e.g. FTP) -- this is usually going to
+# be `packages/INDEX'. Returns success unless media cannot be initialized for
+# any reason (e.g. user cancels media selection dialog) or an error occurs. The
+# index is sorted before being loaded into $var_to_set.
+#
+# NOTE: The index is processed with f_index_read() [below] after being loaded.
+#
+f_index_initialize()
+{
+	local __path="$1" __var_to_set="${2:-PACKAGE_INDEX}"
+
+	[ "$_INDEX_INITTED" ] && return $SUCCESS
+	[ "$__path" ] || return $FAILURE
+
+	# Got any media?
+	f_media_verify || return $FAILURE
+
+	# Does it move when you kick it?
+	f_device_init media || return $FAILURE
+
+	f_show_info "$msg_attempting_to_fetch_file_from_selected_media" \
+	            "$__path"
+	eval "$__var_to_set"='$( f_device_get media "$__path" | sort )'
+	if [ $? -ne $SUCCESS ]; then
+		f_show_msg "$msg_unable_to_get_file_from_selected_media" \
+		           "$__path"
+		f_device_shutdown media
+		return $FAILURE
+	fi
+
+	f_show_info "$msg_located_index_now_reading_package_data_from_it"
+	if ! f_index_read "$__var_to_set"; then
+		f_show_msg "$msg_io_or_format_error_on_index_file" "$__path"
+		return $FAILURE
+	fi
+
+	_INDEX_INITTED=1
+	return $SUCCESS
+}
+
+# f_index_read [$var_to_get]
+#
+# Process the INDEX file (contents contained in $var_to_get) and...
+#
+# 1. create a list ($CATEGORY_MENU_LIST) of categories with package counts
+# 2. For convenience, create $_npkgs holding the total number of all packages
+# 3. extract associative categories for each package into $_categories_$varpkg

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-head mailing list