[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#499296: marked as done ([python-apt] Incorrect use of select)



Your message dated Thu, 30 Jul 2009 14:02:02 +0200
with message-id <20090730140050.GA10403@debian.org>
and subject line Fixed in python-apt 0.7.11.1
has caused the Debian Bug report #499296,
regarding [python-apt] Incorrect use of select
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 owner@bugs.debian.org
immediately.)


-- 
499296: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499296
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python-apt
Version: 0.7.7.1
Severity: normal
Tags: patch

--- Please enter the report below this line. ---

apt/progress.py is using select to check the status of dpkg, but it will fail 
if there is an interruption not directly related with dpkg (such as child 
process exiting or something else related to the main program). From the 
select man page:
[EINTR]            A signal was delivered before the time limit expired
                       and before any of the selected events occurred.

The normal course of action is to just retry the select call.

diff -wruN python-apt-0.7.7.1-old/apt/progress.py 
python-apt-0.7.7.1/apt/progress.py
--- python-apt-0.7.7.1-old/apt/progress.py	2008-07-25 14:52:16.000000000 -0400
+++ python-apt-0.7.7.1/apt/progress.py	2008-09-17 10:07:08.000000000 -0400
@@ -203,7 +203,9 @@
         return os.fork()
     def waitChild(self):
         while True:
-            select.select([self.statusfd],[],[], self.selectTimeout)
+            try: select.select([self.statusfd],[],[], self.selectTimeout)
+            except select.error, e:
+                if e[0] != EINTR: raise
             self.updateInterface()
             (pid, res) = os.waitpid(self.child_pid,os.WNOHANG)
             if pid == self.child_pid:

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.26

Debian Release: lenny/sid
  500 unstable        www.emdebian.org 
  500 unstable        gulus.usherbrooke.ca 
  500 testing         gulus.usherbrooke.ca 
    1 experimental    gulus.usherbrooke.ca 

--- Package information. ---
Depends                          (Version) | Installed
==========================================-+-=============
python                            (<< 2.6) | 2.5.2-2
python                            (>= 2.4) | 2.5.2-2
python-central                  (>= 0.6.7) | 0.6.8
libapt-inst-libc6.7-6-1.1                  | 
libapt-pkg-libc6.7-6-4.6                   | 
libc6                           (>= 2.7-1) | 2.7-13
libgcc1                       (>= 1:4.1.1) | 1:4.3.2-1
libstdc++6                      (>= 4.2.1) | 4.3.2-1
lsb-release                                | 3.2-20





--- End Message ---
--- Begin Message ---
Version: 0.7.11.1


python-apt (0.7.11.1) unstable; urgency=low

  [ Stephan Peijnik ]
  * apt/progress/__init__.py:
    - Exception handling fixes in InstallProgress class.
  
  [ Michael Vogt ]
  * python/tag.cc:
    - merge patch from John Wright that adds FindRaw method
      (closes: #538723)

 -- Michael Vogt <mvo@debian.org>  Wed, 29 Jul 2009 19:15:56 +0200

fixed by the first change, missed the bug number.
-- 
Julian Andres Klode  - Free Software Developer
   Debian Developer  - Contributing Member of SPI
   Ubuntu Member     - Fellow of FSFE

Website: http://jak-linux.org/   XMPP: juliank@jabber.org
Debian:  http://www.debian.org/  SPI:  http://www.spi-inc.org/
Ubuntu:  http://www.ubuntu.com/  FSFE: http://www.fsfe.org/


--- End Message ---

Reply to: