From ac4d95c3a18545787589433dbfefa377e45b7f8d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 2 Oct 2018 03:52:22 +0200 Subject: libdpkg: Call the pager with «$SHELL -c» to respect POSIX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PAGER environment variable is specified in POSIX as taking a pager command and any number of arguments to be passed to «sh -c», so we have to preserve that behavior or this breaks badly on systems where PAGER is set that way. This actually gets in the way of improving the pager command presence detection, but we'll fix that later on, by making the scanning of the environment variable smarter or by trying to execute the fallbacks. Closes: #910009 --- man/dpkg-query.man | 8 +++++++- man/dpkg.man | 11 +++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'man') diff --git a/man/dpkg-query.man b/man/dpkg-query.man index 992309a9f..531faa4ed 100644 --- a/man/dpkg-query.man +++ b/man/dpkg-query.man @@ -318,8 +318,14 @@ memory allocations, etc. . .SH ENVIRONMENT .TP +.B SHELL +Sets the program to execute when spawning a command via a shell +(since dpkg 1.19.2). +.TP .B PAGER -Sets the pager program to use (since dpkg 1.19.1). +Sets the pager command to use (since dpkg 1.19.1), which will be executed +with «\fB$SHELL -c\fP». +If \fBSHELL\fP is not set, «\fBsh\fP» will be used instead. .TP .B DPKG_ADMINDIR If set and the \fB\-\-admindir\fP option has not been specified, it will diff --git a/man/dpkg.man b/man/dpkg.man index eff9d6667..6696b17b3 100644 --- a/man/dpkg.man +++ b/man/dpkg.man @@ -880,11 +880,14 @@ specific configuration file. If set, \fBdpkg\fP will use it as the directory in which to create temporary files and directories. .TP -.B PAGER -The program \fBdpkg\fP will execute when displaying the conffiles. -.TP .B SHELL -The program \fBdpkg\fP will execute when starting a new interactive shell. +The program \fBdpkg\fP will execute when starting a new interactive shell, +or when spawning a command via a shell. +.TP +.B PAGER +The program \fBdpkg\fP will execute when running a pager, for example when +displaying the conffile differences. +If \fBSHELL\fP is not set, «\fBsh\fP» will be used instead. .TP .B DPKG_COLORS Sets the color mode (since dpkg 1.18.5). -- cgit v1.2.3