Add calls to log_message and hook statusfd_send into log_action.
+2008-03-25 Ian Jackson <ian@davenant.greenend.org.uk>
+
+ * src/archives.c (archivefiles): Call log_message.
+ * src/configure.c (deferred_configure): Likewise.
+ * src/packages.c (packages): Likewise.
+ * src/processarc.c (process_archive): Call log_action after printing
+ the action to perform to stdout.
+ * src/help.c (log_action): Call statusfd_send.
+
2008-03-25 Ian Jackson <ian@davenant.greenend.org.uk>,
Guillem Jover <guillem@debian.org>
* Move test suite invokation to a new check target in debian/rules.
* Add support for nocheck DEB_BUILD_OPTIONS in debian/rules, so that the
dpkg test suite can be skept if desired.
+ * Improve log and status-fd output by printing more status change updates
+ and actions. Thanks to Ian Jackson.
[ Raphael Hertzog ]
* Add a warning displayed by dpkg-genchanges if the current version is
+2008-03-25 Ian Jackson <ian@davenant.greenend.org.uk>
+
+ * dpkg.1: Document improved status-fd output.
+
2008-03-14 Guillem Jover <guillem@debian.org>
Fix errors spotted by Helge Kreutzmann.
Don't install the package if the same version of the package is already
installed.
.TP
-\fB\-\-status\-fd \fP\fI<n>\fP
-Send package status info to file descriptor \fI<n>\fP. This can be given
-multiple times. Status updates are of the form `status: <pkg>: <pkg state>'.
-Errors are reported as `status: <pkg>: error: extend-error-message'.
-Configuration file conflicts are reported as
-`status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited'.
+\fB\-\-status\-fd \fR\fIn\fR
+Send machine-readable package status and progress information to file
+descriptor \fIn\fP. This option can be specified multiple times. The
+information is generally one record per line, in one of the following
+forms:
+.RS
+.TP
+.BI "status: " package ": " status
+Package status changed; \fIstatus\fR is as in the status file.
+.TP
+.BI "status: " package " : error : " extended-error-message
+An error occurred. Unfortunately at the time of writing
+\fIextended-error-message\fR can contain newlines, although in locales
+where the translators have not made mistakes every newline is followed
+by at least one space.
+.TP
+.BI "status: " file " : conffile-prompt : '" real-old "' '" real-new "' " useredited " " distedited
+User is being asked a configuration file question.
+.TP
+.BI "processing: " stage ": " package
+Sent just before a processing stage starts. \fIstage\fR is one of
+.BR upgrade ", " install " (both sent before unpacking),"
+.BR configure ", " trigproc ", " remove ", " purge .
+.RE
.TP
\fB\-\-log=\fP\fIfilename\fP
Log status change updates and actions to \fIfilename\fP, instead of
: msdbrw_needsuperuser);
checkpath();
+ log_message("startup archives %s", cipaction->olong);
if (f_recursive) {
printf(_("Setting up %s (%s) ...\n"),pkg->name,
versiondescribe(&pkg->installed.version, vdew_nonambig));
+ log_action("configure", pkg);
if (f_noact) {
pkg->status= stat_installed;
log_message("%s %s %s %s", action, pkg->name,
versiondescribe(&pkg->installed.version, vdew_nonambig),
versiondescribe(&pkg->available.version, vdew_nonambig));
+ statusfd_send("processing: %s: %s", action, pkg->name);
}
: fc_nonroot ? msdbrw_write
: msdbrw_needsuperuser);
checkpath();
+ log_message("startup packages %s", cipaction->olong);
if (f_pending) {
filesdbinit();
if (pkg->status != stat_notinstalled && pkg->status != stat_configfiles) {
- log_action("upgrade", pkg);
printf(_("Preparing to replace %s %s (using %s) ...\n"),
pkg->name,
versiondescribe(&pkg->installed.version,vdew_nonambig),
pfilename);
+ log_action("upgrade", pkg);
} else {
printf(_("Unpacking %s (from %s) ...\n"),pkg->name,pfilename);
log_action("install", pkg);