diff options
| -rw-r--r-- | bitbake/lib/pyinotify.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/pyinotify.py b/bitbake/lib/pyinotify.py index 8c94b3e334..5c9b6d0fe2 100644 --- a/bitbake/lib/pyinotify.py +++ b/bitbake/lib/pyinotify.py | |||
| @@ -603,6 +603,17 @@ class _ProcessEvent: | |||
| 603 | unknown event. | 603 | unknown event. |
| 604 | """ | 604 | """ |
| 605 | stripped_mask = event.mask - (event.mask & IN_ISDIR) | 605 | stripped_mask = event.mask - (event.mask & IN_ISDIR) |
| 606 | # Bitbake hack - we see event masks of 0x6, IN_MODIFY & IN_ATTRIB | ||
| 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, | ||
| 609 | # IN_MODIFY and IN_ACCESS can arrive together. | ||
| 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 | ||
| 612 | if (stripped_mask & IN_MODIFY) and (stripped_mask & IN_ATTRIB): | ||
| 613 | stripped_mask = stripped_mask - (stripped_mask & IN_ATTRIB) | ||
| 614 | if (stripped_mask & IN_MODIFY) and (stripped_mask & IN_ACCESS): | ||
| 615 | stripped_mask = stripped_mask - (stripped_mask & IN_ACCESS) | ||
| 616 | |||
| 606 | maskname = EventsCodes.ALL_VALUES.get(stripped_mask) | 617 | maskname = EventsCodes.ALL_VALUES.get(stripped_mask) |
| 607 | if maskname is None: | 618 | if maskname is None: |
| 608 | raise ProcessEventError("Unknown mask 0x%08x" % stripped_mask) | 619 | raise ProcessEventError("Unknown mask 0x%08x" % stripped_mask) |
