Merged from trunk -r14182:14186
authorFabian Groffen <grobian@gentoo.org>
Sat, 5 Sep 2009 10:55:47 +0000 (10:55 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 5 Sep 2009 10:55:47 +0000 (10:55 -0000)
   | 14184    | Fix documentation of some QA_* variables.                   |
   | arfrever |                                                             |

   | 14185    | Bug #282808 - Handle a potential KeyError inside            |
   | zmedico  | PollScheduler._poll_loop() when _poll_event_queue contains  |
   |          | an event for a file descriptor that has already been        |
   |          | unregistered.                                               |

   | 14186    | Remove unnecessary redundant dict lookup at the beginning   |
   | zmedico  | of catpkgsplit(). Thanks to Marat Radchenko                 |
   |          | <slonopotamusorama@gmail.com> for this patch.               |

svn path=/main/branches/prefix/; revision=14194

man/ebuild.5
pym/_emerge/PollScheduler.py
pym/portage/versions.py

index 7f4d4fa7f01e6d60440557eca57831cae7ba82c2..dcb9b7eb099153b1448399fb88e9e8088acfdc7d 100644 (file)
@@ -480,7 +480,7 @@ Note that objects that violate these rules may fail on some architectures.
 \fBQA_TEXTRELS\fR
 This variable can be set to a list of file paths, relative to the image
 directory, of files that contain text relocations that cannot be eliminated.
-The paths may contain regular expressions.
+The paths may contain fnmatch patterns.
 .br
 This variable is intended to be used on closed\-source binary objects that
 cannot be altered.
@@ -488,7 +488,7 @@ cannot be altered.
 \fBQA_EXECSTACK\fR
 This should contain a list of file paths, relative to the image directory, of
 objects that require executable stack in order to run.
-The paths may contain regular expressions.
+The paths may contain fnmatch patterns.
 .br
 This variable is intended to be used on objects that truly need executable
 stack (i.e. not those marked to need it which in fact do not).
@@ -496,7 +496,7 @@ stack (i.e. not those marked to need it which in fact do not).
 \fBQA_WX_LOAD\fR
 This should contain a list of file paths, relative to the image directory, of
 files that contain writable and executable segments.  These are rare.
-The paths may contain regular expressions.
+The paths may contain fnmatch patterns.
 .TP
 \fBQA_DT_HASH\fR
 This should contain a list of file paths, relative to the image directory, of
index 3733af45be416a328819931e64270b1e7766bc34..8250cb00a3a49b239fd809d8193c8554c96cd98e 100644 (file)
@@ -123,7 +123,14 @@ class PollScheduler(object):
                try:
                        while event_handlers:
                                f, event = self._next_poll_event()
-                               handler, reg_id = event_handlers[f]
+                               try:
+                                       handler, reg_id = event_handlers[f]
+                               except KeyError:
+                                       # This means unregister was called for a file descriptor
+                                       # that still had a pending event in _poll_event_queue.
+                                       # Since unregister has been called, we should assume that
+                                       # the event can be safely ignored.
+                                       continue
                                handler(f, event)
                                event_handled = True
                except StopIteration:
index 3fa96d2a4d1076785f4082c42c50d13cbd90cfe4..00898a78167a3b69f9f3c4b808020e2a2a7b66f9 100644 (file)
@@ -292,8 +292,6 @@ def catpkgsplit(mydata,silent=1):
        """
 
        try:
-               if not catcache[mydata]:
-                       return None
                return catcache[mydata]
        except KeyError:
                pass