From 29efb9dda712554a2f05eb0475e3cd0a6b8a90fb Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 11 Aug 2015 22:07:18 +0200 Subject: document VERSION 2 (and 3) pre-install-pkgs hook interface [Commiter: Patch adapted to apply to current version of the manpage and added/moved a few words about Version 3 to make it fit better] Closes: 627188 --- doc/apt.conf.5.xml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'doc/apt.conf.5.xml') diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 6b5ebf2d7..d5e185757 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -775,10 +775,34 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; install to the commands, one per line on the requested file descriptor, defaulting to standard input. - Version 2 of this protocol dumps more information, including the - protocol version, the APT configuration space and the packages, files - and versions being changed. Version 3 adds the architecture and MultiArch - flag to each version being dumped. + Version 2 of this protocol sends more information through the requested + file descriptor: a line with the text VERSION 2, + the APT configuration space, and a list of package actions with filename + and version information. + + Each configuration directive line has the form + key=value. Special characters (equal signs, newlines, + nonprintable characters, quotation marks, and percent signs in + key and newlines, nonprintable characters, and percent + signs in value) are %-encoded. Lists are represented + by multiple key::=value lines with the same key. The + configuration section ends with a blank line. + + Package action lines consist of five fields in Version 2: old version, direction + of version change (< for upgrades, > for downgrades, = for no + change), new version, action. The version fields are "-" for no version + at all (for example when installing a package for the first time; no + version is treated as earlier than any real version, so that is an + upgrade, indicated as - < 1.23.4). The action field + is "**CONFIGURE**" if the package is being configured, "**REMOVE**" if it + is being removed, or the filename of a .deb file if it is being + unpacked. + + In Version 3 after each version field follows the architecture + of this version, which is "-" if there is no version, and a field showing + the MultiArch type "same", foreign", "allowed" or "none". Note that "none" + is an incorrect typename which is just kept to remain compatible, it + should be read as "no" and users are encouraged to support both. The version of the protocol to be used for the command cmd can be chosen by setting -- cgit v1.2.3