diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/pyinotify.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/bitbake/lib/pyinotify.py b/bitbake/lib/pyinotify.py index 5c9b6d0fe2..3c5dab0312 100644 --- a/bitbake/lib/pyinotify.py +++ b/bitbake/lib/pyinotify.py | |||
@@ -595,24 +595,23 @@ class _ProcessEvent: | |||
595 | @type event: Event object | 595 | @type event: Event object |
596 | @return: By convention when used from the ProcessEvent class: | 596 | @return: By convention when used from the ProcessEvent class: |
597 | - Returning False or None (default value) means keep on | 597 | - Returning False or None (default value) means keep on |
598 | executing next chained functors (see chain.py example). | 598 | executing next chained functors (see chain.py example). |
599 | - Returning True instead means do not execute next | 599 | - Returning True instead means do not execute next |
600 | processing functions. | 600 | processing functions. |
601 | @rtype: bool | 601 | @rtype: bool |
602 | @raise ProcessEventError: Event object undispatchable, | 602 | @raise ProcessEventError: Event object undispatchable, |
603 | unknown event. | 603 | unknown event. |
604 | """ | 604 | """ |
605 | stripped_mask = event.mask - (event.mask & IN_ISDIR) | 605 | stripped_mask = event.mask & ~IN_ISDIR |
606 | # Bitbake hack - we see event masks of 0x6, IN_MODIFY & IN_ATTRIB | 606 | # Bitbake hack - we see event masks of 0x6, i.e., IN_MODIFY & IN_ATTRIB. |
607 | # The kernel inotify code can set more than one of the bits in the mask, | 607 | # The kernel inotify code can set more than one of the bits in the mask, |
608 | # fsnotify_change() in linux/fsnotify.h is quite clear that IN_ATTRIB, | 608 | # fsnotify_change() in linux/fsnotify.h is quite clear that IN_ATTRIB, |
609 | # IN_MODIFY and IN_ACCESS can arrive together. | 609 | # IN_MODIFY and IN_ACCESS can arrive together. |
610 | # This breaks the code below which assume only one mask bit is ever | 610 | # This breaks the code below which assume only one mask bit is ever |
611 | # set in an event. We don't care about attrib or access in bitbake so drop those | 611 | # set in an event. We don't care about attrib or access in bitbake so |
612 | if (stripped_mask & IN_MODIFY) and (stripped_mask & IN_ATTRIB): | 612 | # drop those. |
613 | stripped_mask = stripped_mask - (stripped_mask & IN_ATTRIB) | 613 | if stripped_mask & IN_MODIFY: |
614 | if (stripped_mask & IN_MODIFY) and (stripped_mask & IN_ACCESS): | 614 | stripped_mask &= ~(IN_ATTRIB | IN_ACCESS) |
615 | stripped_mask = stripped_mask - (stripped_mask & IN_ACCESS) | ||
616 | 615 | ||
617 | maskname = EventsCodes.ALL_VALUES.get(stripped_mask) | 616 | maskname = EventsCodes.ALL_VALUES.get(stripped_mask) |
618 | if maskname is None: | 617 | if maskname is None: |