debconf-apt-progress

NAME

debconf-apt-progress - install packages using debconf to display a progress bar

SYNOPSIS

debconf-apt-progress [--] command [args ...] debconf-apt-progress --config debconf-apt-progress --start debconf-apt-progress --from waypoint --to waypoint [--] command [args ...] debconf-apt-progress --stop

DESCRIPTION

debconf-apt-progress installs packages using debconf to display a progress bar. The given command should be any command-line apt frontend; specifically, it must send progress information to the file descriptor selected by the CWAPT::Status-Fd configuration option, and must keep the file descriptors nominated by the CWAPT::Keep-Fds configuration option open when invoking debconf (directly or indirectly), as those file descriptors will be used for the debconf passthrough protocol.
The arguments to the command you supply should generally include -y (for apt-get or aptitude) or similar to avoid the apt frontend prompting for input. debconf-apt-progress cannot do this itself because the appropriate argument may differ between apt frontends.
The --start, --stop, --from, and --to options may be used to create a progress bar with multiple segments for different stages of installation, provided that the caller is a debconf confmodule. The caller may also interact with the progress bar itself using the debconf protocol if it so desires.
debconf locks its config database when it starts up, which makes it unfortunately inconvenient to have one instance of debconf displaying the progress bar and another passing through questions from packages being installed. If you're using a multiple-segment progress bar, you'll need to eval the output of the --config option before starting the debconf frontend to work around this. See “\s-1EXAMPLES\s0” in the \s-1EXAMPLES\s0 section below.

OPTIONS

"--config" Print environment variables necessary to start up a progress bar frontend.
"--start" Start up a progress bar, running from 0 to 100 by default. Use --from and --to to use other endpoints.
"--from If used with --start, make the progress bar begin at waypoint rather than 0. Otherwise, install packages with their progress bar beginning at this “waypoint”. Must be used with --to.
"--to If used with --start, make the progress bar end at waypoint rather than 100. Otherwise, install packages with their progress bar ending at this “waypoint”. Must be used with --from.
"--stop" Stop a running progress bar.
"--logfile Send the normal output from apt to the given file.
"--logstderr" Send the normal output from apt to stderr. If you supply neither --logfile nor --logstderr, the normal output from apt will be discarded.
"--" Terminate options. Since you will normally need to give at least the -y argument to the command being run, you will usually need to use -- to prevent that being interpreted as an option to debconf-apt-progress itself.

EXAMPLES

Install the \s-1GNOME\s0 desktop and an X window system development environment within a progress bar: debconf-apt-progress -- aptitude -y install gnome x-window-system-dev Install the \s-1GNOME\s0, \s-1KDE\s0, and \s-1XFCE\s0 desktops within a single progress bar, allocating 45% of the progress bar for each of \s-1GNOME\s0 and \s-1KDE\s0 and the remaining 10% for \s-1XFCE:\s0 #! /bin/sh set -e case $1 in '') eval "$(debconf-apt-progress --config)" "$0" debconf ;; debconf) . /usr/share/debconf/confmodule debconf-apt-progress --start debconf-apt-progress --from 0 --to 45 -- apt-get -y install gnome debconf-apt-progress --from 45 --to 90 -- apt-get -y install kde debconf-apt-progress --from 90 --to 100 -- apt-get -y install xfce4 debconf-apt-progress --stop ;; esac

AUTHORS

Colin Watson <cjwatson@debian.org> Joey Hess <joeyh@debian.org>