summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--lib/dpkg/pager.c4
-rw-r--r--man/dpkg-query.man4
-rw-r--r--man/dpkg.man4
-rw-r--r--t/codespell/stopwords1
5 files changed, 14 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 0da74e559..a1476c1a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ dpkg (1.19.2) UNRELEASED; urgency=medium
and make the commands honor the DPKG_ROOT environment variable.
* libdpkg: Call the pager with «$SHELL -c» to respect POSIX. Closes: #910009
* libdpkg: Do not spawn a pager if we are going to call «cat».
+ * libdpkg: Honor DPKG_PAGER when spawning a pager.
+ Suggested by Craig Sanders <cas@taz.net.au>.
* Perl modules:
- Dpkg::OpenPGP: Ignore Version field in enarmored output.
Fixes CPAN#127217.
diff --git a/lib/dpkg/pager.c b/lib/dpkg/pager.c
index 24cea9dfb..fd326d67d 100644
--- a/lib/dpkg/pager.c
+++ b/lib/dpkg/pager.c
@@ -47,7 +47,9 @@ pager_get_exec(void)
if (!isatty(0) || !isatty(1))
return CAT;
- pager = getenv("PAGER");
+ pager = getenv("DPKG_PAGER");
+ if (str_is_unset(pager))
+ pager = getenv("PAGER");
if (str_is_unset(pager))
pager = DEFAULTPAGER;
diff --git a/man/dpkg-query.man b/man/dpkg-query.man
index 531faa4ed..639cba8c0 100644
--- a/man/dpkg-query.man
+++ b/man/dpkg-query.man
@@ -323,9 +323,13 @@ Sets the program to execute when spawning a command via a shell
(since dpkg 1.19.2).
.TP
.B PAGER
+.TQ
+.B DPKG_PAGER
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.
+The \fBDPKG_PAGER\fP overrides the \fBPAGER\fP environment variable
+(since dpkg 1.19.2).
.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 6696b17b3..ffb799d43 100644
--- a/man/dpkg.man
+++ b/man/dpkg.man
@@ -885,9 +885,13 @@ The program \fBdpkg\fP will execute when starting a new interactive shell,
or when spawning a command via a shell.
.TP
.B PAGER
+.TQ
+.B DPKG_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.
+The \fBDPKG_PAGER\fP overrides the \fBPAGER\fP environment variable
+(since dpkg 1.19.2).
.TP
.B DPKG_COLORS
Sets the color mode (since dpkg 1.18.5).
diff --git a/t/codespell/stopwords b/t/codespell/stopwords
index a8ef90dde..1909fdd40 100644
--- a/t/codespell/stopwords
+++ b/t/codespell/stopwords
@@ -1,3 +1,4 @@
+cas
chage
cmo
creat