I've completed a significant enhancement to bsdinstall's distextract.
NB: Proposed commit message further below (after length "Story" section).
Proposal is to commit this in 2 weeks and MFC to stable/10 *after* the
10.1-RELEASE (likely January MFC).
I'd like to ask for community help in testing the improved distextract
(especially over serial).
NOTE: The only thing that I've changed in this patch and the above
patched image was the distextract code. So the unpacking of the OS
to the target installation media will look different than it does
currently, but other than that no changes.
I really liked the direction that bsdinstall took in utilizing dialog(3)'s
dialog_mixedgauge() widget -- allowing us to, unlike sysinstall, show
overall progress for multiple items. However, I wanted to bring back
some things from sysinstall which were nice -- such as the status info
displayed along the bottom of the terminal (showing data through-
The problem I had was that dialog_mixedgauge() is not very flexible.
That being said, there are quite a few places where dialog_mixedgauge()
+ bsdinstall distextract
+ bsdinstall distfetch
And I would really like to use it in bsdconfig for package installation.
However, due to known short-comings I have not yet utilized that
widget in bsdconfig.
Knowing that I would potentially have to duplicate the work I perform
on distextract two or three times over, I chose to develop a replacement
for dialog_mixedgauge() in the form of separate library (in its own
The result is the "dpv" library -- styled after "pv" from ports (in the
sysutils category but does more): http://freshports.org/sysutils/pv
It also comes with a "dpv" utility. A mixture of bsdconfig, bsdinstall,
and other utilities should consume both the library and utility:
+ bsdinstall distextract will use dpv(3) in place of dialog_mixedgauge()
NB: See above-mentioned patch "dpv-1.1-freebsd-head-patch-*.txt"
+ bsdinstall distfetch will use the same
+ bsdconfig packages will use dpv(1) in place of dialog(1) --infobox
+ A new tool "dpkg" will use dpv(3) to visualize pkg(1) EVENT_PIPE data
+ bsdconfig packages will use new "dpkg" tool to visualize pkg mgmt
versus simply using dialog --infobox as it currently does
How the dpv(3) library function works is by not using dialog_mixedgauge()
(which was found to be very inflexible) but rather using dialog(3)'s more
flexible dialog_gauge() widget. The secret behind getting a better widget
is that dialog_gauge() allows you to dynamically update the prompt text
after it has been called to life. The dpv(3) library renders prompt text
similar to what you get with dialog_mixedgauge() but requires less work,
is more flexible, and works around the shortcomings of the latter.
For even more backstory, see my blog:
Proposed commit message:
In bsdinstall's distextract, replace mixed_gauge() of dialog(3) with
new dpv(3) wrapper to dialog(3) dialog_gauge(). The dpv(3) library provides
a more flexible and refined interface similar to dialog_mixedgauge() however
is implemented atop the more generalized dialog_gauge() for portability.
This commit also introduces dpv(1) as a full test program for dpv(3).
Noticeable improvements in bsdinstall's distextract will be a status line
showing data rate information (with support for localeconv(3) to format
numbers according to $LANG or $LC_ALL conversion information), i18n support,
improved auto-sizing of gauge widget, a ``wheel barrow'' to keep the user
informed that things are moving (even if status/progress has not changed),
improved color support (mini-progress bars use the same color, if enabled,
as the main gauge bar), and several other improvements (some not visible).
dpv stands for "dialog progress view".
Discussed on: -current
Reviewed by: <your name(s) here>
Tested by: jelischer, <your name(s) here>
MFC after: 4 months
X-MFC-to: stable/10, stable/9
--This line, and those below, will be ignored--
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"