Package: apt-listchanges
Version: 2.85.7+squeeze1
Severity: normal
Tags: patch
Hi!
Now that apt-listchanges is priority standard, it's installed on a lot more
systems. New users seem not to understand that the information is being shown
to them in the "less" program (in the default configuration) and even if they
did they do understand that much, they don't necessarily know how to exit less.
We're seen this quite a number of times in #debian over the last few months
where users ask questions like:
<user> How do I make Christian Perrier go away?
(that one took us a while to work out... the user was stuck in apt-listchanges
following an update to the samba package).
And again today, a user was saying that "aptitude install" didn't want to do
anything and the pastebin of the session showed it going as far as
"Reading changelogs... Done". When asked what happened after that, he said
"nothing". Not knowing how to exit the pager, he was closing that terminal
window meaning that aptitude never actually did the things it was supposed to
do.
The attached (quite trivial) patch tries to make this situation a little better.
If "pager" is to be used and if LESS is not defined in the environment already
(a user who can set LESS can work out what (END) means themselves), it fiddles
with LESS to make the final prompt a little more intuitive. This covers the
"default install" situation where frontend=pager and pager->less. Perhaps
different words would be better, perhaps adding it to the xterm-pager code
would be appropriate too (although if you're reconfiguring apt-listchanges,
perhaps you know what less is already), perhaps it could do with some i18n/l10n.
If you think a small patch like this is acceptable for apt-listchanges, it would
be great to see if the SRMs would be prepared to accept it into squeeze at a
future point release since it is affecting stable users.
thanks!
Stuart
-- System Information:
Debian Release: 6.0.2
APT prefers stable
APT policy: (500, 'stable'), (500, 'stable-updates'), (101,
'proposed-updates'), (60, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.38-2-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages apt-listchanges depends on:
ii apt 0.8.10.3+squeeze1 Advanced front-end for dpkg
ii debconf [debconf-2.0] 1.5.36.1 Debian configuration management sy
ii debianutils 3.4 Miscellaneous utilities specific t
ii python 2.6.6-3+squeeze6 interactive high-level object-orie
ii python-apt 0.7.100.1+squeeze1 Python interface to libapt-pkg
ii python-support 1.0.10 automated rebuilding support for P
ii ucf 3.0025+nmu1 Update Configuration File: preserv
Versions of packages apt-listchanges recommends:
ii exim4 4.72-6+squeeze2 metapackage to ease Exim MTA (v4)
ii exim4-daemon-light [mail 4.72-6+squeeze2 lightweight Exim MTA (v4) daemon
Versions of packages apt-listchanges suggests:
ii iceweasel [www-browser] 5.0-1~bpo60+1 Web browser based on Firefox
ii konqueror [www-browser] 4:4.4.5-2 advanced file manager, web browser
ii konsole [x-terminal-emulat 4:4.4.5-2 X terminal emulator
ii lynx-cur [www-browser] 2.8.8dev.5-1 Text-mode WWW Browser with NLS sup
ii python-glade2 2.17.0-4 GTK+ bindings: Glade support
ii python-gtk2 2.17.0-4 Python bindings for the GTK+ widge
ii w3m [www-browser] 0.5.2-9 WWW browsable pager with excellent
ii xterm [x-terminal-emulator 261-1 X terminal emulator
-- debconf information:
apt-listchanges/confirm: false
apt-listchanges/which: news
apt-listchanges/frontend: pager
apt-listchanges/email-address: root
apt-listchanges/save-seen: true
--- apt_listchanges.py.orig 2011-07-12 10:39:53.171591784 +0100
+++ apt_listchanges.py 2011-07-12 10:45:17.364029925 +0100
@@ -249,4 +249,6 @@
class pager(runcommand, ttyconfirm, fancyprogress, frontend):
def __init__(self, *args):
+ if not 'LESS' in os.environ:
+ os.environ['LESS'] = "-P?e(q to quit)"
apply(frontend.__init__, [self] + list(args))
self.command = self.config.get('pager', 'sensible-pager')