Your message dated Sun, 19 Sep 2010 13:32:06 +0000
with message-id <[email protected]>
and subject line Bug#456271: fixed in apt-listchanges 2.85.4
has caused the Debian Bug report #456271,
regarding apt-listchanges: cannot interrupted by Ctrl-C
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
456271: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=456271
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: apt-listchanges
Version: 2.79
Severity: normal
Tags: patch
Hi,
apt-listchanges cannot interrupted by pressing Ctrl-C
while 'Reading changelogs...' is printed.
How to reproduce:
1) Run `aptitude safe-upgrade` and press Ctrl-C while 'Reading changelogs...'
is printed.
2) Or, run 'apt-listchanges /var/cache/apt/archives/*'
and press Ctrl-C while 'Reading changelogs...' is printed.
Note: Problem is occurred when processing newer .deb files.
Executing 'aptitude clean; aptitude -d safe-upgrade' can be used to
fill /var/cache/apt/archives/ with newer .deb files.
After some review of source code, apt-listchanges seems ignore
the return value of os.system() in
apt-listchanges-2.79/apt-listchanges/DebianFiles.py:
# tar exits unsuccessfully if _any_ of the files we wanted
# were not available, so we can't do much with its status
os.system(extract_command)
Above comment text is right, but the return value of os.system() can be also
used to inspect whether the child process is exited due to signal or not.
Because of system(3) ignores SIGINT signal while the child process is running,
the parent process (apt-listchanges) cannot receives SIGINT signal.
So that, when Ctrl-C is pressed and SIGINT signal was sent,
only the child process can receives SIGINT signal.
Inspecting the return value of os.system() allows the parent process to
determine whether SIGINT was sent.
I think that if the child process exited due to SIGINT, the parent process
should work as they also got SIGINT signal, 'exit()' in most case.
I suggest to apply following patch:
diff -ur apt-listchanges-2.79.orig/apt-listchanges/DebianFiles.py
apt-listchanges-2.79/apt-listchanges/DebianFiles.py
--- apt-listchanges-2.79.orig/apt-listchanges/DebianFiles.py 2007-12-13
16:54:32.000000000 +0900
+++ apt-listchanges-2.79/apt-listchanges/DebianFiles.py 2007-12-14
13:15:42.000000000 +0900
@@ -30,6 +30,7 @@
import errno
import glob
import shutil
+import signal
import apt_pkg
from ALChacks import *
@@ -147,7 +148,10 @@
# tar exits unsuccessfully if _any_ of the files we wanted
# were not available, so we can't do much with its status
- os.system(extract_command)
+ status = os.system(extract_command)
+
+ if os.WIFSIGNALED(status) and os.WTERMSIG(status) == signal.SIGINT:
+ raise KeyboardInterrupt
return tempdir
Note: Since python raises KeyboardInterrupt exception when Ctrl-C is pressed,
I have made it to raises KeyboardInterrupt exception, too.
With this change, apt-listchanges correctly exited when Ctrl-C is
pressed while the child process is running.
While testing above patch by
execute 'apt-listchanges /var/cache/apt/archives/*' and press Ctrl-C,
execute 'apt-listchanges /var/cache/apt/archives/*' and press Ctrl-C,
execute 'apt-listchanges /var/cache/apt/archives/*' and press Ctrl-C..., again
and again,
I found that many temporary directory (/tmp/apt-listchangesXXXXX) is remained
in /tmp.
I think it would be nice if temporary directory is surely removed.
But unfortunately, I can't do anything for that because I have not enough
knowledge for python programing...
Regards,
Morita Sho
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-3-k7 (SMP w/1 CPU core)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages apt-listchanges depends on:
ii apt 0.7.9 Advanced front-end for dpkg
ii debconf [debconf-2.0] 1.5.17 Debian configuration management sy
ii debianutils 2.28.2 Miscellaneous utilities specific t
ii python 2.4.4-6 An interactive high-level object-o
ii python-apt 0.7.4 Python interface to libapt-pkg
ii python-support 0.7.5 automated rebuilding support for p
ii ucf 3.004 Update Configuration File: preserv
Versions of packages apt-listchanges recommends:
ii exim4 4.68-2 meta-package to ease Exim MTA (v4)
ii exim4-daemon-light [mail-tran 4.68-2 lightweight Exim MTA (v4) daemon
ii python-glade2 2.12.0-2 GTK+ bindings: Glade support
ii python-gtk2 2.12.0-2 Python bindings for the GTK+ widge
-- debconf information:
* apt-listchanges/confirm: true
* apt-listchanges/which: both
* apt-listchanges/frontend: browser
* apt-listchanges/email-address:
* apt-listchanges/save-seen: true
--- End Message ---
--- Begin Message ---
Source: apt-listchanges
Source-Version: 2.85.4
We believe that the bug you reported is fixed in the latest version of
apt-listchanges, which is due to be installed in the Debian FTP archive:
apt-listchanges_2.85.4.dsc
to main/a/apt-listchanges/apt-listchanges_2.85.4.dsc
apt-listchanges_2.85.4.tar.gz
to main/a/apt-listchanges/apt-listchanges_2.85.4.tar.gz
apt-listchanges_2.85.4_all.deb
to main/a/apt-listchanges/apt-listchanges_2.85.4_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sandro Tosi <[email protected]> (supplier of updated apt-listchanges package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 19 Sep 2010 15:19:16 +0200
Source: apt-listchanges
Binary: apt-listchanges
Architecture: source all
Version: 2.85.4
Distribution: unstable
Urgency: low
Maintainer: Pierre Habouzit <[email protected]>
Changed-By: Sandro Tosi <[email protected]>
Description:
apt-listchanges - package change history notification tool
Closes: 456271 511448 593224
Changes:
apt-listchanges (2.85.4) unstable; urgency=low
.
[ Pierre Habouzit ]
* make apt-listchange interruptible by ^C (Closes: #456271)
* Use pythonism to guess the encoding to use (Closes: #511448) -
thanks to Joerg Woelke <[email protected]>
.
[ Sandro Tosi ]
* Updated French translation; thanks to Christian Perrier; Closes:
#593224
Checksums-Sha1:
cffdd3cbabec16cdb5a6d832836d51288f6f8678 1090 apt-listchanges_2.85.4.dsc
c2e01cf45425de3e8233654d3874124c61698fbc 103375 apt-listchanges_2.85.4.tar.gz
72ffaa525d8f9d66649988bd76a0f38e8158701f 83582 apt-listchanges_2.85.4_all.deb
Checksums-Sha256:
5d19a030975349b9f77cefea311b81212a9d2e67c54db747d26fdad476412e3c 1090
apt-listchanges_2.85.4.dsc
dc93d06ad03aa6389939b97d488bdd399bc287a6351dd3c9fec41f67618a942f 103375
apt-listchanges_2.85.4.tar.gz
89e4ed11472a7d5759b1707c04c76ffe7090f36ecd02adf4ed607f84f63e8f8b 83582
apt-listchanges_2.85.4_all.deb
Files:
4532b359384273af94c8e918e2dcad89 1090 utils standard apt-listchanges_2.85.4.dsc
8020505c6edaa18fe439361433197587 103375 utils standard
apt-listchanges_2.85.4.tar.gz
162ccbd564de718049b0fd0b919d7101 83582 utils standard
apt-listchanges_2.85.4_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkyWDs0ACgkQAukwV0RN2VA+iACfXMpnLAytzY4jKXkQj7bfl2yv
z4kAn0/2owb9bw61Q6z+PXbIdBUBUbzH
=NKaH
-----END PGP SIGNATURE-----
--- End Message ---