summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2018-10-02 03:52:22 +0200
committerGuillem Jover <guillem@debian.org>2018-10-08 11:55:52 +0200
commitac4d95c3a18545787589433dbfefa377e45b7f8d (patch)
tree1d05361a4fd0dc6e1a830a38a2e253c06fb71c9b /man
parentce9b2e88602dcdff93963b9cb8aef302179b81c9 (diff)
downloaddpkg-ac4d95c3a18545787589433dbfefa377e45b7f8d.tar.gz
libdpkg: Call the pager with «$SHELL -c» to respect POSIX
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
Diffstat (limited to 'man')
-rw-r--r--man/dpkg-query.man8
-rw-r--r--man/dpkg.man11
2 files changed, 14 insertions, 5 deletions
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).